//
// UIView+Utils.h
// Borrowed from Three20 / DTFoundation
//
// (c) 2013 iOS. No rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (Utils)
/**
* Shortcut for frame.origin.x.
*
* Sets frame.origin.x = left
*/
@property (nonatomic) CGFloat left;
/**
* Shortcut for frame.origin.y
*
* Sets frame.origin.y = top
*/
@property (nonatomic) CGFloat top;
/**
* Shortcut for frame.origin.x + frame.size.width
*
* Sets frame.origin.x = right - frame.size.width
*/
@property (nonatomic) CGFloat right;
/**
* Shortcut for frame.origin.y + frame.size.height
*
* Sets frame.origin.y = bottom - frame.size.height
*/
@property (nonatomic) CGFloat bottom;
/**
* Shortcut for frame.size.width
*
* Sets frame.size.width = width
*/
@property (nonatomic) CGFloat width;
/**
* Shortcut for frame.size.height
*
* Sets frame.size.height = height
*/
@property (nonatomic) CGFloat height;
/**
* Shortcut for center.x
*
* Sets center.x = centerX
*/
@property (nonatomic) CGFloat centerX;
/**
* Shortcut for center.y
*
* Sets center.y = centerY
*/
@property (nonatomic) CGFloat centerY;
/**
* Return the x coordinate on the screen.
*/
@property (nonatomic, readonly) CGFloat screenX;
/**
* Return the y coordinate on the screen.
*/
@property (nonatomic, readonly) CGFloat screenY;
/**
* Return the x coordinate on the screen, taking into account scroll views.
*/
@property (nonatomic, readonly) CGFloat screenViewX;
/**
* Return the y coordinate on the screen, taking into account scroll views.
*/
@property (nonatomic, readonly) CGFloat screenViewY;
/**
* Return the view frame on the screen, taking into account scroll views.
*/
@property (nonatomic, readonly) CGRect screenFrame;
/**
* Shortcut for frame.origin
*/
@property (nonatomic) CGPoint origin;
/**
* Shortcut for frame.size
*/
@property (nonatomic) CGSize size;
/**
* Return the width in portrait or the height in landscape.
*/
@property (nonatomic, readonly) CGFloat orientationWidth;
/**
* Return the height in portrait or the width in landscape.
*/
@property (nonatomic, readonly) CGFloat orientationHeight;
/**
20160808
*/
@property (nonatomic,assign) CGFloat x;
@property (nonatomic,assign) CGFloat y;
/**
* Finds the first descendant view (including this view) that is a member of a particular class.
*/
- (UIView*)descendantOrSelfWithClass:(Class)cls;
/**
* Finds the first ancestor view (including this view) that is a member of a particular class.
*/
- (UIView*)ancestorOrSelfWithClass:(Class)cls;
/**
* Removes all subviews.
*/
- (void)removeAllSubviews;
/**
Attaches the given block for a single tap action to the receiver.
@param block The block to execute.
*/
- (void)setTapActionWithBlock:(void (^)(void))block;
/**
Attaches the given block for a long press action to the receiver.
@param block The block to execute.
*/
- (void)setLongPressActionWithBlock:(void (^)(void))block;
//添加边框和圆角,直接设置border和圆角会漏出图片边缘
- (void)giveBorderWithCornerRadious:(CGFloat)radius borderColor:(UIColor *)borderColor andBorderWidth:(CGFloat)borderWidth;
//自定义添加圆角
- (void)addCorners:(UIRectCorner)corner;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SuspendedBubbleDemo.zip (24个子文件)
SuspendedBubbleDemo
SuspendedBubbleDemo.xcodeproj
project.xcworkspace
contents.xcworkspacedata 164B
xcuserdata
yfc.xcuserdatad
UserInterfaceState.xcuserstate 19KB
project.pbxproj 14KB
xcuserdata
yfc.xcuserdatad
xcschemes
xcschememanagement.plist 491B
SuspendedBubbleDemo.xcscheme 3KB
xcdebugger
Breakpoints_v2.xcbkptlist 91B
.DS_Store 6KB
SuspendedBubbleDemo
Assets.xcassets
AppIcon.appiconset
Contents.json 1KB
main.m 333B
02dog.png 45KB
UIView+Utils.m 8KB
NSTimer+Block.h 341B
UIView+Utils.h 3KB
AppDelegate.h 276B
AppDelegate.m 2KB
NSTimer+Block.m 799B
Base.lproj
LaunchScreen.storyboard 2KB
Main.storyboard 2KB
ViewController.h 214B
00dog.png 31KB
Info.plist 1KB
ViewController.m 6KB
01dog.png 36KB
未命名480.mov 7.24MB
共 24 条
- 1
资源评论
- weixin_403221572019-10-14没下载下来
- chang_jiang192017-07-25效果不错的
_小呵呵
- 粉丝: 6878
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python和opencv的样本交互标注工具+源码+文档说明(期末大作业&课程设计&项目开发)
- IMG_20240329_150532.jpg
- 《电路》大作业:基于matlab实现的节点电压法计算+源代码+文档说明
- 3401-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- Mysql 版中国省市区数据表SQL
- 数值分析,基于MATLAB GUI 的“数值分析方法”计算器+源代码+文档说明
- 基于matlab水果识别系统代码32gui界面设计
- 基于Python大规模文本分析系统的开题报告.docx
- 3401-CMN3401-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- python实现的四则运算计算器
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功