简体   繁体   中英

Disabling the detail view controller in a split view controller on the iPad in iOS 5

I have a split view controller in my iPad app. It has a list of Tenants for a mall on the left side and detailed information about the selected tenant on the right.

When you press the edit button on the master view controller (list of tenants) it should disable the right view controller (the detail view for the tenant). How do I accomplish this?

The only thing I can think of is adding a UIImageView with a semi transparent background and hiding/showing it when the master calls it's setEditing.

This functionality ships with the iPad. If you open up the Messages.app and hit the edit button in the master view (left), the conversation or detail view (right) becomes grey and disabled and you cannot interact with it until you hit "Done" on the left side. How can I do this in my app?

So long as the right view controller is the delegate of the master (which should be created for you anyhow, seeing as that's how the UISplitViewController object is supposed to be used), it's a simple call to a method you define yourself. Maybe pass some Boolean value through to indicate editing, and animate a black CALayer's alpha property in response.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM