Saturday, 14 June 2014

TextView Text Won't Set After Segue


hello.

i've got code sets textview.text in separate function:
code:
-(void)settext {  textview.text = @"hi";  }
and call in viewdidload:
code:
[self settext];
and when press button switches new view controller:
code:
-(ibaction)switch {  [self performseguewithidentifier:@"gonew" sender:null];  }
i use same performsegue code in other view controller go first, when goes textview refuses set text.

help?
 

your view still in memory, won't reload nib (viewdidload loaded when loaded nib/xib, whatever).
change settext viewwillappear. should set each time :)
 


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