
IOS-项目汇总
文章平均质量分 65
lxm_780337
这个作者很懒,什么都没留下…
展开
-
按钮背景颜色
- (void)setBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state {[self setBackgroundImage:[UIButton imageWithColor:backgroundColor] forState:state];} + (UIImage *)原创 2015-11-23 10:36:42 · 330 阅读 · 0 评论 -
一些常用的正则表达式
#import "NDPredicateCheck.h"@implementation NDPredicateCheck#pragma 正则匹配手机号+ (BOOL)checkTelNumber:(NSString *) telNumber{ NSString *pattern = @"^1+[3|5|7|8]+\\d{9}$"原创 2015-12-21 10:59:43 · 293 阅读 · 0 评论 -
倒计时
NsTimer * coderTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:selfWeak selector:@selector(countDown:) userInfo:nil repeats:YES];- (void)countDown:(NSTimer *)theTime{ count--原创 2015-12-21 10:58:22 · 298 阅读 · 0 评论 -
第三方汇总
轻松学习之 最简化原生效果集成UITableViewCell左滑多个按钮(1).https://github.com/MortimerGoro/MGSwipeTableCell(2).苹果的原生效果,又想在iOS8系统以下使用JZTableViewRowAction https://github.com/JazysYu/JZTableViewRowAction原创 2015-11-19 11:56:51 · 252 阅读 · 0 评论 -
数组过滤去掉相同元素
#import @interface NSMutableArray (FilterElement)/** * 过滤掉相同的元素 * * @return返回一个数组 */- (NSMutableArray*)filterTheSameElement;@end#import "NSMutableArray+FilterElement.h转载 2015-11-19 11:21:48 · 433 阅读 · 0 评论 -
去掉字符串的空白字符,以及只限制图片的宽不限高德图片适配
-(void)setGoodsDes:(NSString *)goodsDes{ //NSString去掉换行符和空白字符 NSString * goodsDesStr = [[goodsDes ndValue]stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]原创 2015-11-18 20:09:54 · 467 阅读 · 0 评论 -
网络监测
#import "AFNetworkReachabilityManager.h"typedef void (^NetworkReachable)(AFNetworkReachabilityManager * reachability);typedef void (^NetworkUnreachable)(AFNetworkReachabilityManager@proper原创 2015-11-18 19:47:39 · 490 阅读 · 0 评论 -
版本信息获取类
#import #import "NDFSMState.h"@interface DeviceManage : NSObject@property (nonatomic, strong) NSString *osVersion; //系统版本 eg.@"8.1"@property (nonatomic, strong) NSString *mac;原创 2015-11-18 18:42:27 · 394 阅读 · 0 评论 -
带下划线的按钮
#import @interface NDPageSelectBtn : UIButton@property(nonatomic, strong) UIColor *indicatorColor;@end#import "NDPageSelectBtn.h"@implementation NDPageSelectBtn@synthesize indicato原创 2015-11-18 19:27:55 · 864 阅读 · 0 评论 -
IOS工具类 (钱转化(分到元),快速创建控件,生成图片名称,验证信息,缓存文件,友盟统计类,转换为json,获取URl中的参数)
项目所用到的自定义工具总结钱转化(分到元)+ (NSString *)changeformatterWithFen:(id)money{ if ([money isKindOfClass:[NSString class]]) { return money; }else if([money isKindOfClass:[NSNumber clas原创 2015-11-18 18:10:03 · 1524 阅读 · 0 评论 -
默认图
#import "NDDefaultView.h"#import "Masonry.h"#define WidthScale ([UIScreen mainScreen].bounds.size.width/375)#define HeightScale ([UIScreen mainScreen].bounds.size.height/667)@implementat原创 2015-11-18 19:08:30 · 300 阅读 · 0 评论 -
一些宏定义
#define WeakObj(o) autoreleasepool{} __weak typeof(o) o##Weak = o#define StrongObj(o) autoreleasepool{} __strong typeof(o) o = o##Weak#define KNavHeig原创 2015-11-18 18:28:46 · 271 阅读 · 0 评论 -
可以复制的label
#import @interface NDCopyLabel : UILabel@property(nonatomic,copy)NSString *obtainText;@property(nonatomic,copy)NSString *showWord;@end#import "NDCopyLabel.h"@interface NDCopy原创 2015-11-18 19:33:39 · 690 阅读 · 0 评论 -
加载动画
#import @interface YYAnimationIndicator : UIView{ NSTimer *timer; UILabel *backView; DeviceManage * device;}@property(nonatomic,strong)UIImageView *imageView;;@pro原创 2015-11-18 19:06:24 · 314 阅读 · 0 评论 -
可自己消失的alterView
#pragma mark -自消alertView- (void)showDissmissSelfAlertViewTitle:(NSString *)aTitle message:(NSString *)aMessage complete:(void (^)(void))complete{ doneBlock = complete; if (aTitle == n原创 2015-11-18 19:45:58 · 343 阅读 · 0 评论 -
计算字符长度
#import #import @interface CustomSize : NSObject+ (CGSize)returnSize:(NSString *)str font:(UIFont *)font;+ (CGSize)returnSize:(NSString *)str fontSize:(CGFloat)fontSize;+ (CGFloat)adap原创 2015-11-18 19:32:10 · 468 阅读 · 0 评论 -
自定义textFeild
#import @interface NDTextFieldPadding : UITextField{ BOOL isEnablePadding; float paddingLeft; float paddingRight; float paddingTop; float paddingBottom;}+原创 2015-11-18 19:30:03 · 317 阅读 · 0 评论 -
本地文件缓存
#import @interface NDCacheFileManger : NSObject@property (nonatomic, strong) NSString *userPath;+ (NDCacheFileManger *) shareCache;//文件缓存- (NSDictionary*) c原创 2015-12-24 17:14:45 · 303 阅读 · 0 评论