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

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

Related

master detail view for iPhone screen in xamarin

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 ?

How to add left navigation bar in mobile wireframe using Balsamiq.

How to add left navigation bar in mobile wireframe using Balsamiq.
Can anyone tell me the name of that component?
While we don't have a navigator panel built in, you can build one out of rectangles controls.
Or you can just steal the one we built on our web demo by downloading the project. I won't tell anyone. :)

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.

How to separately style HTML5 apps using the Sencha framework for iOS and Android?

App development in native Apps happens separately for iPhone and Android. But in HTML5 Sencha framework apps, the same HTML5 code is used. Should we use same visual styling for alert boxes or buttons for both platforms or should they look different depending on the platform?
Since the same HTML5 code is used, how do you to take care of different look and feel for both platforms? For example, the menu bar is at bottom for iPhone and for android it is at the top. Or for Android we need to hide the top back button Or how to style the alert boxes or buttons differently for both platforms?
Do we need to use different set of CSS files for iOS and for An?
I was going thru the kitchen sync Sencha application and it shows a very basic styling for alert boxes.
You can use the iOS/Android classes that Sencha Touch will add when detecting user agent. For example, if the device is running iOS the body element has the class "x-ios". For android it will be "x-android". This also applies for specific OS versions (ex: "x-ios-4"). Try overriding your user agent in Chrome and inspect the elements under different agents to get an understanding of the classes. Using these classes you can avoid multiple stylesheets and just set up the CSS accordingly depending on the class.
As for specific layout tweaks that cannot be performed with simple CSS - this is where profiles come into play (http://docs.sencha.com/touch/2-1/#!/api/Ext.app.Profile). Set up a profile for Android and iOS, and use the launch function to manipulate specific components as needed.
Using these methods you should be able to keep things organized and minimize the number of separate files needed.

Resources