Monday, 15 March 2010

ios - Refresh Current UIViewController from another view - Swift -


My problem is that I want to apply some settings to my running application when I fly-to refresh the table controller To get a lot of tutorials, but this is not the case.

I have a button inside some of the labels and when I press the button that I open in the form of a popover (like inside the current scene) another view controller, my settings page controller from here I can choose a text label and language color to apply in the app. Unfortunately I do not know how to apply this setting immediately.

Any help, with some code, will be awesome!

You should transfer the instance of the parent controller to popor.

  func showPopover () {var settingController = ... var popoverController = ... settingController.parentController = auto // show popover ...}  

In the setting controller, you will have a vibration parent controller

or you can refresh the parental controls made by Overview Will Willappper, didViewAppear.

Edit

(1)

  @protocol MyDelegate {- (zero) Refresh: (UIColor *) color; } @implement ParentController & lt; MyDelegate & gt; {- (IBAction) showPopover {ChildController * childController = ... childController.delegate = self; ... // show popover} - (blank) Fresh label: (UICLOR *) Apply color to the protocol {Update labels}} @ Adjust the hair controller {MyDeliget * representative; - (IBAction) changeColor {Color * Color = ... if (Rep! = Zero) [Rep] Change: Belle: Color]; {} (2)  

(2) @implementary childcontroller {- (IBAction) changeColor {color * color = ... [[SystemManager example] setColor: color ]; // System Manager Example if Static Variable}} @implementationParentController {- (zero) ViewViewPaper: (BOOL) Animated {[Super ViewWlapper: Animated]; // Static Variables Get Colors from UIColor * color = [[SystemManager Example] getColor]; // update labels here}}


No comments:

Post a Comment