objective c - Display waiting screen when user selects UITable row -
when user selects row in table, need load bunch of data coredata. takes several seconds (at least when running on simulator - haven't tested on device yet, imagine still pretty long). want display loading popover screen (i'm developing ipad) when user selects row, have disappear once data loaded.
when working uibuttons, i've done triggering both touchdown , touchup method. put code display popover on touchdown, actual work (so in case loading coredata) in touchup. @ end of touchup, close popover.
is there way split touches in table view same way ones on button?
so while typing question came across in apple docs willselectrowatindexpath , looks there address issue. didn't see other topics on over so, figured i'd make use of "answer own question - q&a" feature on here, maybe people looking in future find little easier.
huge fyi block:
i should note willselectrowatindexpath supposed return nsindexpath, unlike didselectrowatindexpath (which returns void). however, had
-(void)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath { //stuff } note void return type. xcode (version 4.5) allowed without errors or warnings (and had me in autocomplete list). when ran code way, hit invisible breakpoint in libobjc.a.dylib'objc_autorelease: (maybe becaues have "all exceptions" breakpoint enabled?). couldn't past breakpoint, never got debug information in debugger output console, , app never terminated. happened @ apple doc again , notice supposed return nsindexpath (specifically, index path code should interpret being 1 selected), if didn't happen see there, never have known problem was.
Comments
Post a Comment