自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ccc

  • 博客(29)
  • 收藏
  • 关注

原创 日期格式

NSDate *datepl = [NSDatedateWithTimeIntervalSince1970:strDara.intValue];            NSDateFormatter *formatter = [[NSDateFormatter alloc] init];            [formatter setDateStyle:NSDateFormatter...

2015-03-24 16:56:51 161

原创 从webview获取到NSString url

NSURLRequest *request = [mWebView request];        NSURL *url = [request URL];         NSString *strUrl = [url absoluteString];

2015-03-24 14:35:17 122

iOS 8 UIAlertController

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"标题" message:@"这个是UIAlertController的默认样式" preferredStyle:UIAlertControllerStyleAlert]; [alertController add...

2015-02-10 13:59:10 112

iOS 刷新

//// ViewController.m// BookStore//// Created by cyd on 14-11-21.// Copyright (c) 2014年 cyd. All rights reserved.//#import "IndexViewController.h"#import "UIViewController+MMDraw...

2014-12-31 16:37:10 103

原创 objective-c 关于数组补充

NSArray *values=[dictionaryListData allValues]; NSArray *keys=[dictionaryListData allKeys];

2014-12-31 11:43:58 139

原创 联系人分组

url:http://mobile.9sssd.com/ios/art/967#import 2 @interface HomeViewController : UIViewController3 {4 }5 @property (nonatomic, retain) NSDictionary *contactTitles;//存储所有的联系人信息6 @proper...

2014-12-31 11:31:48 220

切换Controller中的不同UIView且不会覆盖前面一个UI

第一次进来的时候: 1⃣️ m_imageViewGraphs = [[UIImageView alloc]initWithImage:[self minuteLinesView]]; [self.view addSubview:m_imageViewGraphs]; 2⃣️ m_axisUnit=[[AxisUnitPriceView ...

2014-12-30 11:33:37 177

原创 求数组中最大值和最小值

NSNumber *max=[m_listData valueForKeyPath:@"@max.doubleValue"]; NSNumber *min=[m_listData valueForKeyPath:@"@min.doubleValue"];

2014-12-30 11:25:35 243

滑动scrowview 上方菜单选项的下环线随着移动 效果

UIView:-(id)initWithFrame:(CGRect)frame :(id)target :(SEL)sel{ self=[super initWithFrame:frame]; if (self) { scrow.delegate=target; m_showBar=[[ShowBar alloc]initW...

2014-12-30 11:10:47 151

多个UIButtion写在UIScrowView中调用同一个点击事件

UIView:-(void)creatButton:(id)target :(SEL)sel{ for (int i=0; i

2014-12-30 10:56:02 129

原创 ScrowView具体用法

//UIView:-(id)initWithFrame:(CGRect)frame :(id)target :(SEL)sel{ self=[super initWithFrame:frame]; if (self) { controller=target; //传一个id类型的controller [self crea...

2014-12-30 10:32:22 537

原创 objective-c rangeOfString若数组中某个元素含有某个字符,则去除这个元素

-(NSMutableArray *)containCharacter :(NSMutableArray *)arrayDynamic{ for (int i=0; i0) [arrayDynamic removeObjectAtIndex:i]; if ([arrayDynamic[i] rangeOfString:@...

2014-12-26 09:48:39 233

原创 将UNicode编码转化为UTF-8

- (NSString *)replaceUnicode:(NSString *)unicodeStr{ NSString *tempStr1 = [unicodeStr stringByReplacingOccurrencesOfString:@"\\u"withString:@"\\U"]; NSString *tempStr2 = [tempStr1 stringBy...

2014-12-24 13:14:54 471

原创 请求Json数据,并且解析Json数据

NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://api.douban.com/v2/book/search?tag=computer"]]; //将请求的url数据放到NSData对象中 NSData *response = [NSURLConnection ...

2014-12-24 11:58:53 174

原创 iOS 利用CocoaPods,在项目中导入AFNetworking类库

网址:http://code4app.com/article/cocoapods-install-usagepod install --verbose --no-repo-update ruby环境:https://ruby-china.org/wiki/install_ruby_guide

2014-12-24 11:54:42 407

原创 可变字符串 NSMutableString 以及 随机产生不重复10以下的随机数

NSMutableString *goodListString=[[NSMutableString alloc]init];//初始化可变字符串 for (int i=0; i

2014-12-24 09:40:36 95

NSValue与CGPoint,NSNumber与基本数据类型 用法

将n个CGPoint放到数组:NSValue *val=[NSValue valueWithCGPoint:CGPointMake(20+i*xunit, 520-([lisData[i] doubleValue]-beginPrice)/unit)]; [stockMin addObject:val];将数组遍历:for (int i=1; i...

2014-12-23 16:32:54 843

原创 iOS 导航栏

(void)setupRightBarButon{ UIBarButtonItem *btnSave = [[UIBarButtonItem alloc] initWithTitle:@"图片浏览" style:UIBarButtonItemStylePla...

2014-12-23 15:04:09 102

iOS 多线程开发以及网络图片加载

NSDictionary *group=[[NSDictionary alloc]initWithObjectsAndKeys:indexPath,@"indexpath",cell,@"cell", nil]; [NSThread detachNewThreadSelector:@selector(loadLabelTableView:) toTarget:self withObje...

2014-12-23 15:00:57 119

原创 一个controller 切换两个tablevew

[self.view bringSubviewToFront: tablevew];

2014-12-23 13:42:55 97

原创 iOS webview同时请求两个url数据

- (void)webViewDidFinishLoad:(UIWebView *)webView{ NSString *bodyUnicode = [webview stringByEvaluatingJavaScriptFromString:@"document.body.innerText"]; NSString *bodyUtf=[self replac...

2014-12-23 13:42:15 386

原创 iOS webview的请求数据

-(NSURLRequest *)readUrlData{ NSURL *url = [[NSURL alloc]initWithString:stringUrl]; NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; return request;}-(void)readD...

2014-12-22 12:48:38 247

原创 mm_drawerController 的实际使用

- (void)setupLeftMenuButton{ MMDrawerBarButtonItem * leftDrawerButton = [[MMDrawerBarButtonItem alloc] initWithTarget:self action:@selector(leftDrawerButtonPress:)]; [self.navigationItem s...

2014-12-22 10:18:15 80

原创 iOS 刷新

-(EGORefreshTableHeaderView *)refresh//先初始化{ EGORefreshTableHeaderView *egoView=[[EGORefreshTableHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.view.bounds.size.height, self.view....

2014-12-22 10:08:39 81

原创 指针方面注意问题

例子:-(Goods *)getGoods :(NSString *)barcode :(NSArray *)goodsInfo{ Goods *goodObject;//声明一个goos类 for(Goods *goods in goodsInfo ) { if([barcode isEqualToString:goods.barcode])...

2014-12-22 10:01:48 89

原创 iOS侧边抽屉导航控件:MMDrawerController

IndexViewController *viewController=[[IndexViewController alloc]init];//中间的一个类 MenuViewController *menuViewController=[[MenuViewController alloc]init];//左边的一个类 UINavigationController * navig...

2014-12-22 10:01:36 217

原创 本地数据的写入(保存)和读取 plist

首先在AppDelegate.m中 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法中初始话本地文件:[color=red]NSArray *paths=NSSearchPathForDirectoriesInDomains(...

2014-10-25 18:06:49 177

原创 NSNotification 通知

[[NSNotificationCenter defaultCenter]postNotificationName:@"people" object:[self.listdata objectAtIndex:indexPath.row]]//给要传的值写个名字如:@“people”接收: [[NSNotificationCenter defaultCenter]addObserver...

2014-10-25 17:52:14 71

原创 视图界面切换

首先在在AppDelegate.m里的:(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法中加入[color=red]ViewController *viewcontroller=[ViewController new]; ...

2014-10-25 17:30:04 143

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除