iphone - How to update view with UIButtons -


I have been able to button subview a toolbar in your navigation bar and a container visual whose property app relies on state current button set to viewWillAppear , so it was the right thing occurs when I navigate away from the scene to return I thought [ContainerView setNeedsDisplay] will do the trick, but no one

(I believe that the container is forced to update I have UITextViews when textView.text is changed, but the application logic is such that it It is difficult to clearly update all of the correct buttons in the form of changes in the state.)

after "div class =" itemprop = "text">


You can change the navigation status and toolbar buttons anywhere in your code. For the initial setup of the scene, some code is useful for viewing WILLDisappear and viewWillAppear, as you did.

For example, when you have added some text to your text field you can simply start a new UIBarButtonItem and enter it from the program 'Enter' to 'Cancel' If you want to change a button on the navigationBar, then the old one was. (Bool) animated {self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle: (null) viewWillAppear - cancel your pair 'by' buttons in your viewWillAppear ...

  Say: @ "Cancel" style: UIBarButtonItemStylePlain Target: Self-Proceeding: @selector (Cancel Action)] AutoWrecks]; }  

Then you can overwrite the navigation object anywhere in your code by creating a new one in the same way, however, you obviously want to give it a different title ('my "in the example here) and probably in a separate action


context toolbar, Uainavigeshn controller can easily handle changes because it is that every UINAVigationController + UIViewController combo a toolbar Created That is unless you ask do not take kindly to that particular request is to set up the best way toolbar items UIViewController to do and then navigation controller as needed to show the toolbar / hide.

For example, for example, I would make three UIBarButtonItem example initialisation method of UIViewController I ... then I need to do them the array paste it into an array and toolbar assigned to, such as

  [self setToolbarItems: [NSArray arrayWithObjects: Button1, BUTTON2, Button3, zero] animated: nO];  

Then in the viewWillAppear (or viewDidAppear) methods I can use the Navigation Controller to display the toolbar:

  [self.navigationController setToolbarHidden: No Animated: yes];  

Just remember to remove the scene when the view will go away (i.e. with the same call but with the saturarahide: yes). At any point in your UIViewController's code, you can change the button using the same method as you did in the initialization, i.e. [auto-setubar item: .....].


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -