iOS自定义UIButton
来源:互联网 发布:c语言产生0 1随机数 编辑:程序博客网 时间:2024/05/22 01:48
MyUIButton.h
#import <UIKit/UIKit.h>@interface MyUIButton : UIButton@property (nonatomic, assign) BOOL isPressed;- (void)setIsPressed:(BOOL)isPressed;@end
MyUIButton.m
#import "MyUIButton.h"@implementation MyUIButton- (instancetype)init{ self = [super init]; if (self) { } return self;}- (void)setIsPressed:(BOOL)isPressed { _isPressed = isPressed; if (isPressed) { [self setBackgroundColor:[UIColor grayColor]]; } else { [self setBackgroundColor:[UIColor whiteColor]]; }}/*// Only override drawRect: if you perform custom drawing.// An empty implementation adversely affects performance during animation.- (void)drawRect:(CGRect)rect{ // Drawing code}*/@end
0 0
- iOS自定义UIButton
- iOS 自定义UIButton
- iOS自定义UIButton的实现
- iOS巧用UIButton自定义控件
- IOS继承UIControl封装自定义UIButton
- 自定义UIButton
- UIButton 自定义
- 自定义UIButton
- 自定义UIButton
- 自定义UIButton
- 【IOS】UIButton
- iOS-UIButton
- ios UIButton
- IOS UIButton
- UIButton---iOS
- ios-UIButton
- IOS UIButton
- ios uibutton
- dsajmnkljsadn刻录机啊
- Linux gets scanf fgets 分析
- nignx学习篇
- Java编程那些事儿11——JDK的安装、配置和使用
- VS项目属性的一些配置项的总结(important)
- iOS自定义UIButton
- MultiByteToWideChar codepage的定义
- 关于迟绑定、动态联接与Java虚拟机(应用服务器)
- 【转】WinForm 程序的运行框架与启动流程简介(图文)
- JsonArray的使用
- 【转载】Ubuntu下内核编程之第一个模块helloworld
- Linux中有硬件时钟与系统时钟
- ios模拟器size太大
- Lua:元表(metatable)与元方法(meatmethod)