Kenny
Kenny

Reputation: 1

Refresh UISplitViewController after changing the Master's width

I am using iOS 6.0. From this post, I know I could use

[splitViewController setValue:[NSNumber numberWithFloat:10] forKey:@"_masterColumnWidth"];

To change the width of master view.(I do not need to upload my app to AppStore).

But I found this only works in my AppDelegate, before

[self.window makeKeyAndVisible];

For example, it does not work in my MasterViewController viewDidLoad method

I guessed it is because the splieViewController does not reloadView after changing this "_masterColumnWidth" property. What should I do next if I want to change the Master Column width in MasterViewController?

Could you please throw some light on this issue?

Thanks in advance.

Upvotes: 0

Views: 1549

Answers (1)

dasoman
dasoman

Reputation: 26

This works for me:

[splitViewController.view setNeedsLayout];

I use it to show/hide the MasterViewContoller in landscape mode.

Upvotes: 1

Related Questions