
[talkButton mas_remakeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self.topView.mas_centerX); make.width.equalTo(self.topView).multipliedBy(70/75.0);; make.height.equalTo(self.topView.mas_height).multipliedBy(88/210.0); make.centerY.equalTo(self.topicText.mas_centerY); }]; [[UserInfoManager sharedInstance] setPublishOrder:info]; //参数类型 NSDictionary ps:目前使用 Xcode7.3 出现一个问题如果出现 jx 执行出错就卡死,必须杀进程,花费了大量的调试时间
1 songz 2016-08-12 21:00:04 +08:00 去微博 @ bang |
3 jiyee 2016-08-12 22:31:07 +08:00 ``` self.bottomButton().mas__remakeConstraints(block('MASConstraintMaker *', function(make) { make.centerY().equalTo()(self.bottomView()); make.height().equalTo()(self.bottomView()); make.right().equalTo()(self.bottomView()); make.width().equalTo()(100); })); ``` 第二个不好判断。 |
4 expkzb 2016-08-12 22:40:30 +08:00 抛弃 Masonry 改用 PureLayout 就好了(逃) |
5 xi_lin 2016-08-13 21:47:16 +08:00 |
6 amon 2016-08-15 11:47:56 +08:00 talkButton.mas_remakeConstraints(block('MASConstraintMaker*', function(make) { make.centerX().equalTo()(self.topView().mas_centerX()); make.width().equalTo()(self.topView()).multipliedBy()(70 / 75.0);; make.height().equalTo()(self.topView().mas_height()).multipliedBy()(88 / 210.0); make.centerY().equalTo()(self.topicText().mas_centerY()); })); 直接使用 JSPatch Convertor 转换的,楼主可以试用下可行不。 另外文档中有关于 block 的写法。 |
7 fishcat 2016-08-26 11:26:01 +08:00 关注一下,第一需要展开可以看下 https://github.com/bang590/JSPatch/issues/109 |
8 fishcat 2016-08-26 11:28:18 +08:00 不好意思,我刚发现这个竟然没有编辑功能,习惯性的 control + enter Masonry 调试好之后可以教教我, 第二个 应该比较好解决可以看一下 https://github.com/bang590/JSPatch/wiki |
9 Dean OP @fishcat Masonry 问题已解决,主要是注意方法名称带下划线的再添加下划线 ```objc talkButton.mas__remakeConstraints(block('MASConstraintMaker *', function(make) { make.centerX().equalTo()(slf.topView().mas__centerX()); make.centerY().equalTo()(slf.topicText().mas__centerY()); make.width().equalTo()(slf.topView().mas__width()).multipliedBy()(70/75.0); make.height().equalTo()(slf.topView().mas__height()).multipliedBy()(88/210.0); })); ``` |
12 cyanbox 2016-11-25 22:34:48 +08:00 UserInfoManager.sharedInstance().setPublishOrder(info); |