Thursday, 14 March 2013

Strange UIAlertView error


i'm writing chess app. have object holds information board. view controller delegate object, , method checkmateocurred:forblack: called when 1 player reaches checkmate. when checkmated use uialertview notify player(s).
code:
-(void)checkmateoccured:(boardmodel *)boardmodel forblack:(bool)forblack {        uialertview *av = [[[uialertview alloc] initwithtitle:@"checkmate!" message:(forblack ? @"black wins!" : @"white wins!") delegate:nil cancelbuttontitle:@"ok" otherbuttontitles:nil, nil] autorelease];      [av show];  }
when test in iphone simulator, works great. however, when run on device alert view doesn't show up. method indeed being called on device, used nslog check. alert view won't show up. thought maybe having trouble displaying @ time, added code viewdidload method display alert view right when app starts. 1 won't show either. no alert view show in app. what's going on?
 



Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment