文章分类 -  A1-iphone

摘要:CalenderCollectionViewFlowLayout *flowLayout = [[CalenderCollectionViewFlowLayout alloc] init]; flowLayout.minimumLineSpacing = 0; flowLayout.minimumInteritemSpacing = 0; flowLayout.item... 阅读全文
posted @ 2017-11-09 10:46 暖流 阅读(1182) 评论(0) 推荐(0)
摘要:// // BaseVC.m // SmsSessions // // Created by Ken on 16/6/24. // Copyright © 2016年 ken. All rights reserved. // #import "BaseVC.h" @interface BaseVC () { UIView *curView; UIViewControll... 阅读全文
posted @ 2016-06-24 16:39 暖流 阅读(184) 评论(0) 推荐(0)
摘要:- (void)webDataManager:(SDWebDataManager *)dataManager didFinishWithData:(NSData *)aData isCache:(BOOL)isCache { UIImage *img=[UIImage imageWithData:aData]; if(aData.length == 79107 || aDat... 阅读全文
posted @ 2016-05-30 17:32 暖流 阅读(159) 评论(0) 推荐(0)
摘要:- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseI... 阅读全文
posted @ 2016-01-05 19:17 暖流 阅读(289) 评论(0) 推荐(0)
摘要:NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"系统详细的使用手册,请点击查看【移动监管用户手册】"]; [str addAttribute:NSForegroun... 阅读全文
posted @ 2015-12-10 14:21 暖流 阅读(215) 评论(0) 推荐(0)
摘要:- (UIColor *) colorOfPoint:(CGPoint)point{ unsigned char pixel[4] = {0}; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContex... 阅读全文
posted @ 2015-08-07 13:42 暖流 阅读(228) 评论(0) 推荐(0)
摘要://按钮的内在内容大小随着按钮名称变化而变化 UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom]; [btn1 setTitle:@"Hello World" forState:UIControlStateN... 阅读全文
posted @ 2015-04-30 12:27 暖流 阅读(927) 评论(0) 推荐(0)
摘要:m_mutArrGrade = [[NSMutableArray alloc]init]; m_mutArrGrade = [NSMutableArray arrayWithArray:m_arrStore]; NSComparator finderSort = ^(id string1... 阅读全文
posted @ 2015-04-03 09:54 暖流 阅读(213) 评论(0) 推荐(0)
摘要:- (UIButton*)buildButton:(CGRect)frame normalImgStr:(NSString*)normalImgStr highlightImgStr:(NSString*)highlightImgStr sel... 阅读全文
posted @ 2015-03-20 15:36 暖流 阅读(405) 评论(0) 推荐(0)
摘要:点击一个按钮,然后显示loading,同时在后台下载一张图片,最后将下载的图片放到UIImageView中显示为例。 1 //显示loading 2 self.indicator.hidden = NO; 3 [self.indicator startAnimating]; ... 阅读全文
posted @ 2014-11-18 10:10 暖流 阅读(262) 评论(0) 推荐(0)
摘要://识别\n\t多行 1 -(void) theViewInTheLableToRefresh 2 { 3 UILabel *lab = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 310, 1)]; 4 lab.text = m_... 阅读全文
posted @ 2014-11-03 14:44 暖流 阅读(489) 评论(0) 推荐(0)
摘要:[UIApplicationsharedApplication].statusBarHidden = YES; if ([UIApplicationsharedApplication].statusBarHidden == NO) { //iOS7,需要plist里设置 View cont... 阅读全文
posted @ 2014-05-22 16:20 暖流 阅读(259) 评论(0) 推荐(0)
摘要:#import "GLProgram.h"// Base classes#import "GPUImageOpenGLESContext.h"#import "GPUImageOutput.h"#import "GPUImageView.h"#import "GPUImageVideoCamera.... 阅读全文
posted @ 2014-05-05 15:37 暖流 阅读(1509) 评论(0) 推荐(0)
摘要:+ (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... 阅读全文
posted @ 2014-03-31 18:12 暖流 阅读(632) 评论(0) 推荐(0)
摘要:首先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;之所以需要转换 阅读全文
posted @ 2014-02-12 11:24 暖流 阅读(716) 评论(0) 推荐(0)
摘要:#import #import "ShowHelloViewController.h"@interface AppDelegate : UIResponder { NSString *m_strTest;}@property (strong, nonatomic) UIWindow *wind... 阅读全文
posted @ 2014-02-10 17:16 暖流 阅读(450) 评论(0) 推荐(0)
摘要:[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:)name:UIApplicationWillResignActiveNotification object:nil]; //监听是否触发home键挂起程序. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:)name:UIApplic... 阅读全文
posted @ 2014-01-21 14:13 暖流 阅读(541) 评论(0) 推荐(0)
摘要:[[UIApplication sharedApplication] setIdleTimerDisabled:YES]; 保持常量 阅读全文
posted @ 2014-01-16 10:50 暖流 阅读(385) 评论(0) 推荐(0)
摘要:首先自定义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... 阅读全文
posted @ 2014-01-08 11:11 暖流 阅读(413) 评论(0) 推荐(0)
摘要:首先.h文件添加UIGestureRecognizerDelegate //长按设置情景模式 UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressShowView:)]; [self.view addGestureRecognizer:longPress]; [longPress release]; UITapGestureRecognizer* single... 阅读全文
posted @ 2014-01-07 17:35 暖流 阅读(2153) 评论(0) 推荐(0)