Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using MonoTouch.Foundation;
- using MonoTouch.UIKit;
- using MonoTouch.Dialog;
- namespace ad4youTest
- {
- [Preserve (AllMembers=true)]
- class Settings {
- [Section ("Multiline")]
- [Caption ("This is a\nmultiline string\nall you need is the\n[Multiline] attribute")]
- [Multiline]
- public string multi;
- }
- public partial class AppDelegate
- {
- Settings settings;
- public void DemoReflectionApi ()
- {
- if (settings == null){
- settings = new Settings () {
- };
- }
- var bc = new BindingContext (null, settings, "Settings");
- var dv = new DialogViewController (bc.Root, true);
- // When the view goes out of screen, we fetch the data.
- dv.ViewDissapearing += delegate {
- bc.Fetch();
- };
- navigation.PushViewController(dv, false);
- }
- }
- public partial class HomeScreen : UIViewController
- {
- SearchScreen searchScreen;
- //loads the HomeScreen.xib file and connects it to this object
- public HomeScreen () : base ("HomeScreen", null)
- {
- Title = NSBundle.MainBundle.LocalizedString ("Start", "Start");
- TabBarItem.Image = UIImage.FromBundle ("Images/house");
- }
- public override void ViewDidLoad ()
- {
- base.ViewDidLoad ();
- this.searchButton.TouchUpInside += (sender, e) => {
- if(this.searchScreen == null)
- {
- this.searchScreen = new SearchScreen();
- }
- this.NavigationController.PushViewController(searchScreen, true);
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement