-
Notifications
You must be signed in to change notification settings - Fork 1
UIViewFrameUtil
##Summary Now, Handling UIView's frame is a very bother. UIViewFrameUtil make coding to modify UIView frame very easy through 1 line code and setting one element of frame. Your code base should get diet!
- Moving UIView
- Resizing UIView
##Moving UIView
####+(void) move:(UIView *) view moreY:(float) offset ###+(void) move:(UIView *) view moreX:(float) offset
Move to releative offset +/-
Before Code)
CGRect frame = self.ui_textField.frame;
frame.x += 320;
self.ui_textField.frame = frame;
MintKit Code)
[UIViewFrameUtil move:self.ui_textField moreX:320];
####+(void) move:(UIView *) view toY:(float) offset ####+(void) move:(UIView *) view toX:(float) offset
Move to absolute offset
##Resizing UIView
####+(void) size:(UIView *) view height:(float) height ####+(void) size:(UIView *) view width:(float) width ####+(void) size:(UIView *) view w:(float) width andH:(float)height
Resize one property or all.
Before Code)
CGRect frame1 = self.ui_textField.frame;
frame1.height = 320;
self.ui_textField.frame = frame1;
CGRect frame2 = self.ui_textField.frame;
frame2.height = 320;
frame2.width = 120;
self.ui_textField.frame = frame2;
MintKit Code)
[UIViewFrameUtil frame:self.ui_textField height:320];
[UIViewFrameUtil frame:self.ui_textField w:120 andh:320];
####+(void) size:(UIView *) view moreHeight:(float) height ####+(void) size:(UIView *) view moreWidth:(float) width ####+(void) size:(UIView *) view moreWidth:(float) width andMoreHeight:(float)height
Resize to relative size