ios - Bar Button Items disappear from Navigation Controller -
i have strange problem app developing. bar button items disappear @ random times.
i have navigation controller 1 button (as image) takes user menu table view controller via push segue.
the menu table view controller has 3 rows, i.e. menu options.
each menu option takes user view controller via push segue. each view controller has button shown using default buttons.
it's pretty simple straightforward setup without code.
i have noticed many occasions bar button items disappear. no buttons, no menu button etc. although can still tap on area , buttons still work - not visible.
i not doing via code hiding buttons.
i have noticed number of times if leave app in foreground , phone goes sleep, when come buttons gone. not though.
however not time buttons disappear. have seen them disappear whilst using menu system. once again there's no code can see causing this.
i'm on ios9, did same ios8.
any idea problem?
opps ... turns out blame disappearing bar button items.
i loading skstoreproductviewcontroller (presents app store view controller) , wanted make colors match app after search on web found solution:
uinavigationbar.appearance().tintcolor = mycolor
and worked.
but did not affect apps bar button items. wasn't until called mfmailcomposeviewcontroller (to compose email) problem occurred.
when closing mfmailcomposeviewcontroller apps bar button items disappeared.
well didn't disappear, turned same color navigation bar, still there, couldn't see them.
the solution set tint color of skstoreproductviewcontroller this:
mystoreproductviewcontroller.view.tintcolor = mycolor
Comments
Post a Comment