缺少
android:text="按钮名称"
解释下这个类的使用
只要button先继承MCMagnifyLandButton类,其他使用都一样,需要改变点击范围时执行下面的方法
/*
* 清空
*/
- (void)clear;
/*
* 拓展右边空间
*/
- (void)increaseRight:(CGFloat)width;
/*
* 拓展左边空间
*/
- (void)increaseLeft:(CGFloat)width;
/*
* 拓展上层空间
*/
- (void)increaseUp:(CGFloat)width;
/*
* 拓展下层空间
*/
- (void)increaseDown:(CGFloat)width;
/*
* 向右移动
*/
- (void)moveRight:(CGFloat)width;
/*
* 向左移动
*/
- (void)moveLeft:(CGFloat)width;
/*
* 向上移动
*/
- (void)moveUp:(CGFloat)width;
/*
* 向下移动
*/
- (void)moveDown:(CGFloat)width;
/*
* 原始大小翻倍,不包括拓展空间
*/
- (void)multiLand:(NSInteger)multi;
Demo里写的可能更详细,可以下载来看看,代码量其实很小
如果大家感觉不错就star下:https://github.com/CZXBigBrother/MCMagnifyLandButton