ios - Bug using UISplitViewController in a UITabController in iPad interface -


i new ios developer working on first app. i'm quite way in it, , have managed pretty working how want, i'm chasing odd bug.

here's basic app design (yes, understand may not confirm apple ui guidelines) best can describe it:

it's universal app written in latest x code using storyboarding. have working iphone , ipad interface, it's in ipad interface issue exists. root controller uitabview. on 1 of tabs, have split view controller implements typical master detail pattern. in portrait mode, master table hidden , content renders. navigation bar button brings forth master table view. select item , master table view vanishes , right side updates content via segue. far good. rotate device, keeps working. split view master table stays on left, , content renders on right. works great within tab controller.

here 2 use cases demonstrate bug not happening , happening, in order

1- bug not happen a) launch app in portrait. b) select nav button bring master table c) select item table (item renders, master table vanishes) d) rotate device lanscape (master/detail rotates properly) e) pick different view tab controller f) pick original view containing split view g) great

2- bug happens in use case a) launch app in portrait b) select nav button bring master table c) select item table (item renders, master table vanishes) d) pick different view tab controller e) rotate device landscape whilst in other tab view f) pick original view split controller tab bar g) view comes back, detail rendered, master/view missing.

so, seems if master/detail rendered in landscape before other tab view selected, fine. if master/detail view doesn't render in landscape @ least once before pick view in tab, doesn't work right.

in viewwillappear method master/table controller, check self.masterpopovercontroller.ispopovervisible , sure enough returns false.

i'm wondering if bug, or maybe 1 of reasons apple doesn't recommend putting split view in controller?

eventually found answer myself.

https://github.com/grgcombs/intelligentsplitviewcontroller

this sub class of uisplitviewcontroller handles rotations.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -