码迷,mamicode.com
首页 > 其他好文 > 详细

不合法语句 self.contentView.frame.origin.x = x;

时间:2015-08-19 22:47:32      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

下面的写法是错误的:

    CGFloat x = self.contentView.frame.origin.x;

    x = _lastDownX + translation.x;

    self.contentView.frame.origin.x = x;

 

 

 

 

正确的写法是:

    CGRect frame = self.contentView.frame;

    frame.origin.x = _lastDownX + translation.x;

    self.contentView.frame = frame;

不合法语句 self.contentView.frame.origin.x = x;

标签:

原文地址:http://www.cnblogs.com/dengchaojie/p/4743392.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!