|
58 | 58 | }); |
59 | 59 |
|
60 | 60 | it(@"basic pinlayout calls", ^{ |
61 | | - [[[aView pinObjc] top:10] layout]; |
| 61 | + aView.pinObjc.topValue(10).layout(); |
62 | 62 | expect(@(aView.frame)).to(equal(@(CGRectMake(40, 10, 100, 60)))); |
63 | 63 | }); |
64 | 64 |
|
65 | 65 | it(@"using Pin.logMissingLayoutCalls", ^{ |
66 | 66 | Pin.logMissingLayoutCalls = true; |
67 | | - [[aView pinObjc] top:10]; |
| 67 | + aView.pinObjc.topValue(10); |
68 | 68 | //expect(Pin.lastWarningText).to(contain(@"PinLayout commands have been issued without calling the 'layout()' method to complete the layout")); |
69 | 69 | }); |
70 | 70 |
|
71 | 71 | it(@"using Pin.logMissingLayoutCalls set to false", ^{ |
72 | 72 | Pin.logMissingLayoutCalls = false; |
73 | | - [[[aView pinObjc] top:10] layout]; |
| 73 | + aView.pinObjc.topValue(10).layout(); |
74 | 74 | expect(@(aView.frame)).to(equal(@(CGRectMake(40, 10, 100, 60)))); |
75 | 75 | expect(Pin.lastWarningText).to(beNil()); |
76 | 76 | }); |
77 | 77 |
|
78 | 78 | it(@"check the access to PinLayout methods from objective-c", ^{ |
79 | | - [[[rootView pinObjc] wrapContent] layout]; |
80 | | - [[[rootView pinObjc] wrapContentWithType:WrapTypeVertically] layout]; |
81 | | - [[[rootView pinObjc] wrapContentWithInsets:UIEdgeInsetsMake(0, 0, 0, 0)] layout]; |
82 | | - [[[rootView pinObjc] wrapContentWithType:WrapTypeAll insets:UIEdgeInsetsMake(0, 0, 0, 0)] layout]; |
83 | | - [[[rootView pinObjc] wrapContentWithPadding:10] layout]; |
84 | | - [[[rootView pinObjc] wrapContentWithType:WrapTypeHorizontally padding:10] layout]; |
| 79 | + rootView.pinObjc.wrapContent().layout(); |
| 80 | + rootView.pinObjc.wrapContentInsets(UIEdgeInsetsMake(0, 0, 0, 0)).layout(); |
| 81 | + rootView.pinObjc.wrapContentTypeInsets(WrapTypeAll, UIEdgeInsetsMake(0, 0, 0, 0)).layout(); |
| 82 | + rootView.pinObjc.wrapContentPadding(10).layout(); |
| 83 | + rootView.pinObjc.wrapContentTypePadding(WrapTypeHorizontally, 10).layout(); |
85 | 84 | }); |
86 | 85 | }); |
87 | 86 | }); |
|
0 commit comments