objective c - Presenting view controllers on detached ... - sometimes -



objective c - Presenting view controllers on detached ... - sometimes -

like others coming ios8, i'm getting warning:

presenting view controllers on detached view controllers discouraged <edititineraryviewcontroller: 0x7ca56e00>.

this caused next code:

- (void)editactivitydetailsforindexpath:(nsindexpath *)indexpath { nspredicate *predicatefordisplay = [[nspredicate alloc] init]; switch (indexpath.section) { case kincompleteactivitiessection: predicatefordisplay = _predincomplete; break; case kcompleteactivitiessection: predicatefordisplay = _predcomplete; break; default: break; } nsstring *theactivityname = [[nsstring alloc] init]; theactivityname = [[[_activitiesarray filteredarrayusingpredicate:predicatefordisplay] objectatindex:indexpath.row] activityname]; uistoryboard *storyboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; activitydetailviewcontroller *activitydetailvc = [storyboard instantiateviewcontrollerwithidentifier:@"activitydetailview"]; activitydetailvc.modalpresentationstyle = uimodalpresentationformsheet; activitydetailvc.delegate = self; // send activity view activitydetailvc.theactivity = [[_activitiesarray filteredarrayusingpredicate:predicatefordisplay] objectatindex:indexpath.row]; // configure of view _activitydetailspopover = [[uipopovercontroller alloc] initwithcontentviewcontroller:activitydetailvc]; _activitydetailspopover.delegate = self; itinerarycell *cell = (itinerarycell *)[self.itinerarytableview cellforrowatindexpath:indexpath]; activitydetailvc.contentview.backgroundcolor = [uicolor whitecolor]; activitydetailvc.navigationbar.bartintcolor = _colorschemelightcolor; activitydetailvc.navigationbar.titletextattributes = @{nsforegroundcolorattributename:_colorschemecolor}; activitydetailvc.savebutton.tintcolor = _colorschemecolor; activitydetailvc.cancelbutton.tintcolor = _colorschemecolor; activitydetailvc.labelb.textcolor = _colorschemecolor; activitydetailvc.labelm.textcolor = _colorschemecolor; activitydetailvc.activitytitle.textcolor = _colorschemecolor; activitydetailvc.activitytitle.font = [uifont boldsystemfontofsize:17.0]; // nowadays view [_activitydetailspopover presentpopoverfromrect:cell.celldetailsbutton.frame inview:cell.celldetailsbutton.superview permittedarrowdirections:uipopoverarrowdirectionany animated:yes]; }

this ipad app , in case, popover beingness presented in such way have little pointer pointing @ "i" icon sits on tableview cell in tableview.

this works in 3 other places in app without causing warning @ all. reason, implementation, it's causing warning. weird thing is, first place in app used means of presenting popover tableview cell , other instances copies of code!

any ideas can @ figure out hierarchy buggered up? related how tableview cell beingness generated , popover presented on top of it, or have strictly popover itself? or have tableview. don't know start look.

thanks much!

i worked around problem presenting popover view controller presents tableview (in case collection view). problem arises when nowadays cell. i'm assuming cell considered "detached view controller" presenting them give error , not receive rotation events, in turn not utilize popoverpresentationcontroller:willrepositionpopovertorect:inview: callback.

objective-c uitableview uiviewcontroller ios8 uipopover

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

SQL Server : need assitance parsing delimted data and returning a long concatenated string -