How to implement UISearchBar in MonoTouch - ios

I cannot find any material for UISearchBar in MonoTouch. Can anyone help me ?

Both the ContentControls and the MonoCatalog (both versions) samples from Xamarin's github uses UISearchBar.
Several applications (with sources, e.g. TweetStation) also uses it - either directly or by using MonoTouch.Dialog.

Related

json2view like solution for iOS

For Android I see there is a very good solution Json2View:
https://github.com/Avocarrot/json2view
for creating Android app UI on the fly. Is there any similar solution available for iOS? Is there any constraint is having JSON based UI concept for iOS, the way json2view does for Android? Or best would be some common open source library that has flavor for both Android and iOS.
Using React Native you can accomplish the same.
Strictly speaking, its not Json to View but its JavaScript to View.
Whatever views you create in ReactJS, will be created using native UIKit Framework.
For example, if you use scrollview component in JS, it will use a scrollview subclassed of UIScrollView.
Please check this link for in-depth overview
https://facebook.github.io/react-native/
https://github.com/facebook/react-native/issues/823
You cannot do anything like this, you will get apple rejected because of using any kind of code injection.

Does MVVMCross support ActionBar?

I was doing a quick experiment and I was wondering if I have to use MvxTabsFragmentActivity or is it possible to do this using the standard ActionBar logic? I tried to implement it but if I do something similar to this example I get issues with MvxFragment not being able to be converted to Android.App.Fragment.
I was researching this a little and it may be due to a namespace conflict with the v4 support library. Can anyone shed any light on this?
Is MvxTabsFragmentActivity Android's "old" way of doing tabs?
Is MvxTabsFragmentActivity Android's "old" way of doing tabs?
No - Android's old way of doing tabs is using Activities
MvxFragment not being able to be converted to Android.App.Fragment
MvxFragment is based on the support library's Fragment implementation, allowing use back to Android 2.x
You can read more about this support library at http://developer.android.com/tools/support-library/index.html and there's an intro to the mvx fragment implementation at http://slodge.blogspot.co.uk/2013/06/n26-fragments-n1-days-of-mvvmcross.html
Xamarin's support for the support lib is documented in http://docs.xamarin.com/guides/android/platform_features/fragments/part_4_-_providing_backwards_compatibility_with_the_android_support_package
However, there seems to be some problem with Xamarin supporting the latest version - see
http://forums.xamarin.com/discussion/7018/xamarin-support-for-the-new-july-2013-revision-18-v7-compatibility-library for discussion and possible alternatives - from my reading on that thread, Xamarin's suggestion seems to be to use ActionBarSherlock - although I'd also consider LegacyBar

How to use UICollectionViewController in storyboard while still supporting ios 5.1?

It is a best practice to detect if a certain feature's class exists and degrade user's features depending on availability. I created UICollectionView in storyboard and a standard tableview to support ios 5.1 users. I then simply check if the user has this feature and segue to the appropriate scene. However, when I now try to compile my code I get a "dyld: Symbol not found: _UICollectionElementKindSectionHeader" This seems very anti-pattern of apple to not allow ios6.0 features in storyboard with a ios 5.1 deployment target.
if ([UICollectionView class]) {
[self performSegueWithIdentifier:#"UserShow" sender:self];
} else {
[self performSegueWithIdentifier:#"UserShowTable" sender:self];
}
The above seems like a pretty reasonable approach to me...
I know this is not proper to put only link answers but her it is not possible to include the whole files.
Please see this.
A controller is designed to provide the same functionality as UICollectionController of iOS 6 but still supports to iOS 4/5
What developer is telling
PSTCollectionView Open Source, 100% API compatible replacement of
UICollectionView for iOS4.3+
You want to use UICollectionView, but still need to support iOS4/5?
Then you'll gonna love this project. I've originally written it for
PSPDFKit, my iOS PDF framework that supports text selection and
annotations, but this project seemed way to useful for others to to
keep it for myself :) Plus, I would love the influx of new gridviews
to stop. Better just write layout managers and build on a great
codebase.
The goal is to use PSTCollectionView on iOS 4/5 as a fallback and
switch to UICollectionView on iOS6. We even use certain runtime tricks
to create UICollectionView at runtime for older versions of iOS.
Ideally, you just link the files and everything works on older
systems. Practically, it's not that easy, and especially when you're
using subclasses of UICollectionView-classes, since they can't be
replaced at runtime.
You can't. As soon as you drop the collections view controller to the storyboard, it will try to reference it automatically, what will result in the compilation error you've got.
There's no compatibility solution for pre-6.0 deployment via storyboards, but PSTCollectionView does support iOS 5.0+ and is actively maintained. It does work at runtime to use UICollectionView* on 6.0 and later, and should be storyboard compatible.

GridView for Monotouch

I am trying to get a Visual Studio's gridview like control for Monotouch development. I had a look at AQGridView. Does AQGridView works with Monotouch? Is there a library for AQGridView which I can add to my monotouch project?
You should be able to use about any Objective-C library with MonoTouch.
You will just have to setup a MonoTouch binding project in order to use it.
Here is a link to another answer of mine that goes over it: OpenFeint with MonoTouch
Also read the Xamarin docs: http://docs.xamarin.com/ios/advanced_topics/binding_objective-c_types
Another UI library to look at is Three20. It's used in a lot of apps, like Facebook and Dropbox, etc.
I have created MonoTouch bindings for the AQGridView that should meet your needs.
https://github.com/theonlylawislove/MonoTouch.AQGridView
Just include the .csproj inside of your solution and add a reference to it.

What are the blue atomic groupings/tags in MacOS and iOS apps' text field controls called? And is it a standard OS feature?

I have no idea how to call these and so I'm having a hard time googling for it. I've seen these a several times in iOS and MacOS apps to think they might be an OS feature. I'm talking about the blue tags or groups in text field controls. See the images below.
That's an NSTokenField on Mac. On iOS there's no official implementation (file a request if you want one) so you'd have to go with a third-party implementation. If I remember correctly, the Three20 framework has one...
Googling found these iOS versions:
JSTokenField
TTMessageRecipientField (I think)
This helper class is SO much better... https://github.com/thermogl/TITokenFieldView

Resources