文章分类 - A1-iphone
摘要:CalenderCollectionViewFlowLayout *flowLayout = [[CalenderCollectionViewFlowLayout alloc] init]; flowLayout.minimumLineSpacing = 0; flowLayout.minimumInteritemSpacing = 0; flowLayout.item...
阅读全文
摘要:// // BaseVC.m // SmsSessions // // Created by Ken on 16/6/24. // Copyright © 2016年 ken. All rights reserved. // #import "BaseVC.h" @interface BaseVC () { UIView *curView; UIViewControll...
阅读全文
摘要:- (void)webDataManager:(SDWebDataManager *)dataManager didFinishWithData:(NSData *)aData isCache:(BOOL)isCache { UIImage *img=[UIImage imageWithData:aData]; if(aData.length == 79107 || aDat...
阅读全文
摘要:- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseI...
阅读全文
摘要:NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"系统详细的使用手册,请点击查看【移动监管用户手册】"]; [str addAttribute:NSForegroun...
阅读全文
摘要:- (UIColor *) colorOfPoint:(CGPoint)point{ unsigned char pixel[4] = {0}; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContex...
阅读全文
摘要://按钮的内在内容大小随着按钮名称变化而变化 UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom]; [btn1 setTitle:@"Hello World" forState:UIControlStateN...
阅读全文
摘要:m_mutArrGrade = [[NSMutableArray alloc]init]; m_mutArrGrade = [NSMutableArray arrayWithArray:m_arrStore]; NSComparator finderSort = ^(id string1...
阅读全文
摘要:- (UIButton*)buildButton:(CGRect)frame normalImgStr:(NSString*)normalImgStr highlightImgStr:(NSString*)highlightImgStr sel...
阅读全文
摘要:点击一个按钮,然后显示loading,同时在后台下载一张图片,最后将下载的图片放到UIImageView中显示为例。 1 //显示loading 2 self.indicator.hidden = NO; 3 [self.indicator startAnimating]; ...
阅读全文
摘要://识别\n\t多行 1 -(void) theViewInTheLableToRefresh 2 { 3 UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 310, 1)]; 4 lab.text = m_...
阅读全文
摘要:[UIApplicationsharedApplication].statusBarHidden = YES; if ([UIApplicationsharedApplication].statusBarHidden == NO) { //iOS7,需要plist里设置 View cont...
阅读全文
摘要:#import "GLProgram.h"// Base classes#import "GPUImageOpenGLESContext.h"#import "GPUImageOutput.h"#import "GPUImageView.h"#import "GPUImageVideoCamera....
阅读全文
摘要:+ (StoreInfo *)parseEntityWithDictionary:(NSDictionary *)arributeDict{ StoreInfo * instance = [[StoreInfo alloc] init]; for(int i = 0 ; i < [arributeDict count] ; i++) { NSString * attributeStr = [[arributeDict allKeys] objectAtIndex:i]; NSString * tempMethodStr=nil; NS...
阅读全文
摘要:首先CGImageRef与UIImage相互转换//CGImageRef转换成UIImage CGImageRef iOffscreen = CGBitmapContextCreateImage(context);UIImage* image = [UIImage imageWithCGImage: iOffscreen]; //UIImage转换成CGImageRef UIImage *loadImage=[UIImage imageNamed:@"comicsplash.png"];CGImageRef cgimage=loadImage.CGImage;之所以需要转换
阅读全文
摘要:#import #import "ShowHelloViewController.h"@interface AppDelegate : UIResponder { NSString *m_strTest;}@property (strong, nonatomic) UIWindow *wind...
阅读全文
摘要:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:)name:UIApplicationWillResignActiveNotification object:nil]; //监听是否触发home键挂起程序. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:)name:UIApplic...
阅读全文
摘要:[[UIApplication sharedApplication] setIdleTimerDisabled:YES]; 保持常量
阅读全文
摘要:首先自定义view+ (UIView *) changeViewTitleFontSize:(NSString *)strTitle;{ //自定义标题 UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0 , 100, 44)]; titleLabel.backgroundColor = [UIColor clearColor]; titleLabel.font = [UIFont fontWithName: @"Helvetica" size: 14.0]; titleLabe...
阅读全文
摘要:首先.h文件添加UIGestureRecognizerDelegate //长按设置情景模式 UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressShowView:)]; [self.view addGestureRecognizer:longPress]; [longPress release]; UITapGestureRecognizer* single...
阅读全文