Montouch tablview as subview issue - xamarin.ios

I am new to Xamarin IOS and I have a problem with creating nested layouts in IOS as like in Android(some text controls and a list view) . I added a tableview but not sure how to add some text and image controls in a view and add the tableview below the text and image controls. Also I am using ViewPager in Android and is there an equivalent control that I can use in IOS?

Yes, you should use UIScrollView and enable paggin there. The only issue that you need always to set the ContentSize for it, to make it scroll properly. So you should set the common Size of inner content.

You should check out monotouch.dialog for rapid tableview development. Once you get the hang of it, it makes creating tables a lot easier.

Related

UIScrollView Xamarin Ios

How to use both vertical and horizontal ScrollView in Xamarin iOS ?
I am using CollectionView but with it I only get one scrollview working at a time.
It's because it's nature of collection view, you can make it scroll in one direction at a time i.e. either horizontal or vertical. What you exactly want to achieve that you have not mentioned. if you are going to use collection view inside the scroll view, you have to manage it properly.
The best solution would be use a UICollectionView for the horizontal
scroll and the UITableView for the vertical scroll.
But if you want to make it work only using UICollectionView you have to use Subclassing UICollectionViewLayout.
here is link you can refer to make it work, hope this might help you:
1.https://www.brightec.co.uk/ideas/uicollectionview-using-horizontal-and-vertical-scrolling-sticky-rows-and-columns
2.Subclassing UICollectionView
3.UICollectionView scrolling in both directions

Show/Hide UIImageview with collapse/expand space xamarin.ios mvvmcross

I am developing an iOS native app using xamarin. My app contains an UIImageView and a "Remove" button associated with that image for preview purpose. These both ImageView and Remove button is initially hidden. I have another button for selecting picture. so once, user select a photo, it will be display in ImageView and Remove button also appear dynamically. I achieve this through MvvmCross command binding.
The Problem is, when the PreviewImage and button are hidden, then also the screen occupies the blank space. I want it to be collapse, as there is nothing at that time.
So can anyone knows how to handle such situation? I am newby in iOS and xamarin.

uiwebview preventing access to buttons on uitoolbar

Am I thick or what? I have a view controller, and within that there is a UIWebView. When I run the app, the WebView covers the UIToolbar at the bottom and the UIButtons there, and so you cannot navigate away from the WebView. I cannot figure out how to change the WebView size or behaviour.
Unfortunately I do not have sufficient rep to post screenshots. The WebView displays an html file with text. The WebView partially covers the status bar at the top and completely covers the taskbar at the bottom. I can touch and drag the view up to see the taskbar and buttons at the bottom, but cannot use them.
I am using storyboard to build the app, and have done similar apps before without issue (in iOS6) but iOS7 appears to have thrown me a curveball.
I cannot see how to change the size in Xcode - or should I be looking at the html code in the file that the WebView is calling?
Oddly enough this is no longer an issue, I have not made any changes to code or config, and the only thing different is I upgraded my version of X-Code

What is the best way to achieve the following customized layout?

I am kind of wondering what the recommended method is for a customized UI. I have about 5 screens, which will share some of the same elements. One is a topbar, kind of like the navigationbar but different. It has the title on the left, no back buttons, a background image and a logo on the right. The other is a menu at the bottom containing and UIImageView for the bar, 3 UIButtons a the moment opening 2 different screens and one opens the Camera. I want to reuse the top bar and bottom bar on all 5 screens. Sort of like one would use a UserControl on ASP.NET.
Currently I have created 5 ViewControllers, which gives me 5 XIB files that I have to put the same elements on and I have to hook up the same events. I would want to create 2 elements (top and bottom bar) which I can reuse across all screens. Or is there a simpler solution to all of this like e.g. 1 screen pushing different middle parts into it or something like that? Quite the beginner at MonoTouch for that matter, so I'd love to know what the way-to-go for something like this is?
If you are not able to customise / reuse the standard UINavigationController etc, you could -
Create a custom UIView in Xamarin / Monotouch for each of your reusable elements, then insert them into each ViewController (programmatically is probably easiest) as required. This would give some code reuse and is akin to the UserControl example you mentioned.
Alternatively for IOS5+ you could create a Custom ViewController Container which has all the common parts in one place and have a single container UIView which you would then switch the rest of your Content ViewControllers as you need to.
I have actually just finished a github example of this which may help -
https://github.com/wickedw/ViewControllerContainer

UIImagePickerController: Custom camera overlay sitting on top of default controls?

I'm creating a custom camera UI using UIImagePickerController cameraOverlayView property. However, I'd like to keep some of the existing UI -- specifically the flash and camera selection buttons at the top.
My thought was that I'd keep showsCameraControls = YES set the cameraOverlayView to my custom UI and then use [picker.view bringSubviewToFront:overlayView] to make sure my controls on the bottom are sitting on top of the default controls.
Alas, this does not work. I've tried moving the overlay to the front of the view hierarchy in various places without luck. Is there any UIImagePickerController hackery that could achive this? It seems a shame not to be able to reuse at least some of the camera controls while still customizing the UI.
Further investigation it appears this is not possible. You either have to use all of the default cameara UI or none of it.

Resources