Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void) viewDidLayoutSubviews
- {
- [super viewDidLayoutSubviews];
- //NSLog(@"aligning...");
- NSDictionary *attributes = @{NSFontAttributeName: self.topLabel.font};
- CGRect rect = [self.topLabel.text boundingRectWithSize:CGSizeMake(self.topLabel.frame.size.width, CGFLOAT_MAX)
- options:NSStringDrawingUsesLineFragmentOrigin
- attributes:attributes
- context:nil];
- CGRect llR=self.lineLabel.frame;
- llR.size.width=rect.size.width;
- llR.origin.x=llR.origin.x+self.topLabel.frame.size.width-rect.size.width;
- self.lineLabel.frame=llR;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement