-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUIView+iOsUtils.h
42 lines (32 loc) · 1.19 KB
/
UIView+iOsUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// UIView+iOsUtils.h
// iOsUtils
//
// Created by Konstantin Gontarenko on 11/4/11.
// Copyright (c) 2011 iDa Mobile. All rights reserved.
//
@interface UIView(iOsUtils)
@property(nonatomic, assign) CGFloat x;
@property(nonatomic, assign) CGFloat y;
@property(nonatomic, assign) CGFloat width;
@property(nonatomic, assign) CGFloat height;
@property(nonatomic, assign) CGFloat leftEdge;
@property(nonatomic, assign) CGFloat rightEdge;
@property(nonatomic, assign) CGFloat topEdge;
@property(nonatomic, assign) CGFloat bottomEdge;
// When setting the size, the anchor is the upper-left corner of the view.
@property(nonatomic, assign) CGSize size;
-(CGRect)convertBoundsToView:(UIView*)view;
// Same as "Center horizontally in container" interface builder command.
-(void)centerHorizontallyInContainer;
-(void)centerVerticallyInContainer;
-(UIView*)findSubviewRecursivelyOfClass:(Class)subviewClass;
-(UIResponder*)findFirstResponderRecursively;
-(void)resignFirstResponderRecursively;
-(CGFloat)heightThatFits;
-(void)heightToFit;
-(CGFloat)widthThatFits;
-(void)widthToFit;
+(instancetype)loadFromNibNamed:(NSString*)nibName owner:(id)owner options:(NSDictionary*)opts;
+(instancetype)loadFromNib;
@end