Re: positioning two UILabels with auto layout problem
Re: positioning two UILabels with auto layout problem
- Subject: Re: positioning two UILabels with auto layout problem
- From: Robert Vojta <email@hidden>
- Date: Thu, 20 Jun 2013 09:00:12 +0200
Hi,
or you can use visual format, which is much shorter …
NSDictionary *viewsDictionary = NSDictionaryOfVariableBindings( _firstLabel, _secondLabel );
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[_firstLabel(>=16)]-16-[_secondLabel(>=16)]"
options:0
metrics:nil
views:viewsDictionary]];
… or look at some of my macros …
https://github.com/robertvojta/mDevCamp-2013/blob/master/Auto Layout Demo/TMAutoLayout.h
… and your code can be much shorter …
TMALVariableBindingsAMNO( _firstLabel, _secondLabel );
TMAL_ADD_VISUAL( self.view, @"V:[_firstLabel(>=16)]-16-[_secondLabel(>=16)]" );
R.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden