Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

when I set rcl_top , why the height and width changed ? #104

Open
kaich opened this issue May 30, 2014 · 1 comment
Open

when I set rcl_top , why the height and width changed ? #104

kaich opened this issue May 30, 2014 · 1 comment
Labels

Comments

@kaich
Copy link

kaich commented May 30, 2014

I write code as below :

self.ivIcon=[[UIImageView alloc] initWithFrame:CGRectMake(20, 20, 80, 80)];
[self.view addSubview:self.ivIcon];
self.lblTitle=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 12)];
[self.view addSubview:self.lblTitle];
RCLAlignment(self.lblTitle)=@{
                              rcl_top: self.ivIcon.rcl_frameSignal.top,
                              };

I get the self.lblTitle frame = (0 20; 60 18). I don't know why the Height and Width changed. Could you tell me the reason. I am newer to ReactiveCocoa and The Framework. I try to debug find the reason. But I find It's so hard to find a useful information about it .
And what's the difference between RCLAlignment and RCLFrame. I can't understand it.
Hope your anwer, thanks

@jspahrsummers
Copy link
Member

I don't know why the Height and Width changed.

Any components that are unspecified with RCLAlignment or RCLFrame will use the view's intrinsicContentSize.

And what's the difference between RCLAlignment and RCLFrame.

The former corresponds to -[UIView alignmentRectForFrame:], and the latter corresponds to UIView.frame.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants