开发者

UIScrollView returns (null)

I have开发者_Go百科 a a UIScrollView that returns (null) after a action I have. I have set the correct properties and I have set it up correctly in interface builder (It's a IBOutlet). I also have sythesized it. However, when this NSLog I get NULL.

NSLog(@"theImageViewer: %@", theImageViewer);

Now the action is really long and it's like 200 lines but it doesn't modify theImageViewer at all. It also appears that some of my other NSMutableArray, but I can fix them by reinitializing them.

Please help! Thanks,

Coulton


Run your program under the debugger and step through "the action" line-by-line until you see what's (accidentally) clobbering the variable.


I'm going to take a wild guess and posit that you have two different objects. One you're creating in a nib, where it's all hooked up to other objects, and another that you're creating with alloc in your code. If you log self in the different methods where the outlets are or aren't filled, is it the same instance in all of them?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜