Wednesday 15 February 2012

xamarin.ios - Switching to different UITableViewControllers with UISegementedControl -


I have a UISegmentedViewControler in the navigation bar, which has UISegmentedControl

I have tried a lot and nothing Does not work ... Sources considered:

  • I want to get different view controller for a different switching.
  • And many Google research ...

    The entire project is based on storyboard! Any solutions aimed at NIB are not useful.

    Adding container controls to my UINAVigationViewController but in this case I can only embed one controller. It was not possible to create an embedded-segue program even in a code to start UITableViewController which is designed in IB results in an empty view. Because I have to change the seat from the Miteable Wii Controller (ITPT handle): the base (handle) as an empty constructor.

    How can I use the UIEDDead control to switch between different view controllers? I greatly appreciate all your help.

    task resolution:

      public override zero ViewDidLoad () {base .ViewDidLoad (); Create and Embed (TrDetailNavType.Info); Partial Zero Segment Navigation Value Change (Mono-Touch. UITITUIEEDDrint Sender, Monotauch.UET.UIEvent E) {Ent and Embed (Traddentype Type) Sender. Selected); } Private Zero CreateAndEmbed (TrDetailNavType tab) {if (_currentViewController! = Null) {_currentViewController.View.RemoveFromSuperview (); _currentViewController.RemoveFromParentViewController (); } String id; Switch (tab) {case: TrDetailNavType.Info: id = "TagesRapportDetailInfoTableViewController"; break; Case TrDetailNavType.Lohn: Case TrDetailNavType.Material: Case TrDetailNavType.Inventar: Case TrDetailNavType.Fremdleistung: Case TrDetailNavType.Regie: ID = "TagesRapportDetailDummyViewController"; break; } _currentViewController = (UIViewController) Storyboard InstantiateViewController (id); _currentViewController.View.Frame = containerDetail.Bounds; AddChildViewController (_currentViewController); _currentViewController.DidMoveToParentViewController (this); Container Dictate ÁscubeView (_currentViewController.View); }    

No comments:

Post a Comment