0

Most of the time I'm doing projects with storyboard but now I need to mantain an old project that used xib files. My problem is this, I have a ViewController with a scroller \ UIButton \ UITextField on it. If I write something like: [scroller setHidden:YES]; inside ViewDidLoad the scroller will be hidden, but, if I'll put it inside

-(IBAction)checkMember:(id)sender{
[scroller setHidden:YES];
    [self checkMemberLog]; 

Only when those are complete the setHidden will fire up.

How can I force it to fire up instantly? What am I missing?

4

2 に答える 2

1

Try calling checkMemberLog like this:

[self performSelector:@selector(checkMemberLog) withObject:nil afterDelay:0];

Even with a delay of 0, I think this will allow your scroller to be hidden because the selector is queued on the current thread’s run loop, and has to be dequeued before it will run. Even though this happens almost instantly, I'm guessing that an update of the display caused by the setHidden: message is queued first.

于 2013-01-24T16:42:47.697 に答える
0

If you're more comfortable with storyboard maybe it's worth your time to start a new project and import all your old header/class files. It could save you some time and frustration in the end, depending on how much there is to bring over.

于 2013-01-24T15:22:09.047 に答える