We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我分别在- (UIScrollView *)contentScrollView和- (void)viewDidLoad方法上打断点, 程序启动后首先进入的是- (UIScrollView *)contentScrollView{...}。 由于viewDidLoad里会调用contentScrollView方法 也就是说contentScrollView方法调用了两次,所以bug被屏蔽之。
问题发现是: 我继承了NSSlidingViewController类,发现在我的继承类初始化的时候, 会先进入了- (UIScrollView *)contentScrollView 导致在[self.titles count]的输出为0 scrollview的contentsize始终是320 很莫名其妙
结果我把contentScrollView的方法名字改了一下,加了3个字母,改成addContentScrollView 就正常了!
已疯,求解释。
The text was updated successfully, but these errors were encountered:
恩,确实存在这个问题,我研究下:)
Sorry, something went wrong.
我bt打印了下调用堆栈,第一次停在contentScrollView时候,前一帧是[UIViewController setView], 难道是命名冲突,除了这个我想不出其他原因了
恩,我也这么觉得。因为改下名字就正常了,只能说明contentScrollView这名字不合法呗
No branches or pull requests
我分别在- (UIScrollView *)contentScrollView和- (void)viewDidLoad方法上打断点,
程序启动后首先进入的是- (UIScrollView *)contentScrollView{...}。
由于viewDidLoad里会调用contentScrollView方法
也就是说contentScrollView方法调用了两次,所以bug被屏蔽之。
问题发现是:
我继承了NSSlidingViewController类,发现在我的继承类初始化的时候,
会先进入了- (UIScrollView *)contentScrollView
导致在[self.titles count]的输出为0
scrollview的contentsize始终是320
很莫名其妙
结果我把contentScrollView的方法名字改了一下,加了3个字母,改成addContentScrollView
就正常了!
已疯,求解释。
The text was updated successfully, but these errors were encountered: