Wednesday, 25 April 2012

Show the Pop Over while previous Pop Over still visible cause apps crash?


hi all,

in project, when clicked bar button, pop on displayed, when clicked bar button again while previous pop on still visible, cause application crash. below code show pop on when click on bar button:

code:
  -(ibaction) showpopover:(id) sender  {                popoverviewcontroller *popover = [[popoverviewcontroller alloc]               initwithnibname:@"popoverviewcontroller" bundle:[nsbundle           mainbundle]];                     uipopovercontroller * mypopover = [[uipopovercontroller alloc]             initwithcontentviewcontroller:popover];                     mypopover.delegate = self;          [popover release];                    self.popovercontroller = mypopover;          [mypopover release];                    [self.popovercontroller presentpopoverfrombarbuttonitem:sender           permittedarrowdirections:uipopoverarrowdirectionany           animated:yes];      }  
after survey, found may need checking using ispopovervisible property when need display pop over. hope can find out why application crash? know why above case occur?

comments , ideas welcome , appreciated. lot. :)
 



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