master detail view for iPhone screen in xamarin - xamarin.ios

I am new to xamarin and was creating the initial page of the application for iPhone. I added a new project with master-detail template and run it. Now on storyboard I can see both master and detail views. When I debug it for iPad on simulator it works fine and show two screens side by side when required but when I debug it for iPhone it display single screen at a time.
How can I make two pages(master-detail) visible at a time in case of iPhone ?

Related

Creating menuitems in xamarin.ios on a tabbed page using MvvmCross

I am creating a mobile app for android and ios using xamarin and MVVMCross.
In android I have created a tabbed page with 3 tabs using viewpager and toolbar.I have menuitems in the toolbar like Save,Sync etc. on click of which will save the content in each of the 3 tabs back into the database.
I want to implement the same in xamarin.ios but I see one problem here because if I create a tabbed page in ios using MvxTabBarController I am not sure if I can implement a similar concept of toolbar with menuitems where the menuitems will remain common across three tabs.
I am using MvvmCross so I have a MainViewmodel binding to MainViewController which will create 3 tabs for three child Viewmodels further having their respective Viewcontrollers attached.
In short my goal is to achieve the same I did for android application having common menuitems across 3 tabs.
Can anyone please help .....This is my first ios application !!
Thanks,
Santosh

SVG View Box not working on iPhone

I have been working on a simple one page site and as the user scrolls the logo expands. This works well on the desktop but when I check it on IOS it doesn't work - it does work on android. Any thoughts out there? You can see it here.
http://dev.floe.se

Using mvvmcross, how can I "share" a viewmodel to work with a view for iphone and another for ipad? Any special name convention?

I'm developing a cross platform application that targets both android and iOS (iPhone and iPad).
I'm using MvvmCross (thanks Stuart) and Xamarin.
My doubt is related to the iOS development. The application target devices is set to Universal.
I've created a view model named LoginViewModel (inside the core ViewModels directory) and a view named LoginView (inside the Views directory of the UI), so, it respects the mvvmcross naming conventions and everything works fine.
Since the primary purpose of the application is to be used on a iPad, the LoginView is an iPad ViewModelController.
But in the future, I'll be building xib for both iPad and iPhone.
To test this, I created a set of new ViewModelController (changed to extend MvxViewController) and named them LoginViewModel~ipad (ipad view controller) and LoginViewModel~iphone (iphone view controller).
Xamarin Studio didn't let me save the save with the ~ and renamed the set of files to LoginViewModel_ipad and LoginViewModel_iphone (set of files: .xib, .cs and designer.cs).
I add a set of random controls into the xib file using xCode IB and saved them.
I started the application in the iPhone simulator, but my view doesn't appear, only an empty screen (or almost empty).
Can the same viewmodel be shared between an iPhone and iPad view?
If yes, what is the name convention for these cases?
Could you please lead me into the right direction?
Thanks for all the replies,
Luis Pinho
Stuart covers Universal apps in the N+1 series here . This might help.

after successful porting app is not taking touches/taps on cocos2d buttons

After i had successfully ported the app. the app is running fine and taking touches on native ios nibs files where used for dialogs. But it is not taking touches on menu items.
let me explain this. It has some different view of axis. like tap on somewhere on screen will open some other menu which was not tapped. it seems it is taking touches but opening the desired menus but the location of buttons are not proper..
I had similar. In my case I had implementation of touchesBegan,touchesMoved and touchesEnd in View class with calling super. On iOS it works fine and messages going directly to controller. With apportable SDK it does not work. Maybe you have the same situation.

iOS 5.1 UIWebView crash the iOS simulator after loading a PDF file

I'm developing an universal application with two view controllers, a Master View Controller (a UITableViewController) and a Detail View Controller (with a UIWebView). When the user selects an item (each item is an object with a URL property) in the table, the app sets the detailItem property in the DetailViewController. I customized the setDetailItem to detect when the detailItem is set and open the related URL in the DetailViewController's web view.
The user selects another item and the web view loads the other related URL.
It works fine with items containing URLs targeting HTML files. When the URL targets a PDF file, the web view loads it normally but, when the user selects another item, the app crashes.
On the iPhone simulator it crashes if the user returns to the MasterViewController by pressing the back button in the navigation bar. On the iPad simulator, I'm using a UISplitViewController and it crashes when the user selects any other item in the MasterViewController's table view.
Even setting Xcode to display all exceptions it doesn't show any output. Only crashes in the main.m.
Curiously, if I deploy the app on the device and use it, it works fine, but if I run on the device debugging from Xcode it also crashes.
Any idea on how to fix it or is it just a bug in the simulator?
We have the same problem when displaying a PDF in a UIWebview: the simulator crashes, it works fine on devices, though. So it really looks like it could be a bug in the simulator.
BTW: we are using ARC: are you as well?

Resources