自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

转载 判断两个View的GRect是否相等

if (CGRectEqualToRect(self.view.frame, rect)) { // do some stuff}转载于:https://www.cnblogs.com/LeoMabi/p/5301832.html

2016-03-21 14:31:00 175

转载 swift——设置navigationitemtitle的内容以及格颜色

1.用UILabel,自定义整个titleview// var TitleText = UILabel() self.TitleText.frame = CGRectMake(0, 0, 100, 30) self.TitleText.text = "账号" self.TitleText.font = UIFont....

2016-03-17 10:02:00 246

转载 iOS开发--Swift 基于AFNetworking 3.0的网络请求封装

import UIKitclass InternetDataRequeset {  //Post请求时, Body字符串转换成字典方法  //设置类型为静态方法  static func changeStringToDictionary(string : String)->NSDictionary{ let dic: N...

2016-01-22 15:06:00 119

转载 iOS——protoco和delegate (事件代理)

一:被代理人personOnepersonOne.h#import <Foundation/Foundation.h>@protocol SomeThing<NSObject>//需要被代理的事件- (void)doSomeThing:(NSString *)someThing;@end@interface PersonOn...

2016-01-21 09:53:00 106

转载 ios变量的property属性设置和意义

IOS 的@property和@synthesize帮我们轻易的生成对象的getter和setter方法来完成对对象的赋值和访问。但是如果我们如果要动态设置对象的getter和setter方法可以使用@property和@dynamic组合。对象访问方法property的属性设置非常多,诸如:atomic和nonatomic,readwrite和readonly,retain,ass...

2016-01-20 17:16:00 99

转载 iOS应用拨打电话

方法一:特点: 直接拨打, 不弹出提示。 并且, 拨打完以后, 留在通讯录中, 不返回到原来的应用。  //拨打电话 - (void)callPhone:(NSString *)phoneNumber { //phoneNumber = "18369......" NSMutableString * str=[[NSMutableStr...

2016-01-20 09:40:00 77

转载 自定义tableviewCell的分割线

第一种:addsubviewUIView *line = [[UIView alloc]initWithFrame:CGRectMake(10, cellH-0.5, DEVW-10, 0.5)]; line.backgroundColor = ViewLineColor;第二种:自绘分割线。首先设置tableView的separatorS...

2016-01-19 17:29:00 144

转载 UIwebView的html字符串高度计算

if (!webviewHasLoaded && pdIntroduce.length>0) { webView = [[UIWebView alloc]initWithFrame:CGRectMake(10, 30 , DEVW-20, webviewH)]; webView.delegate = sel...

2016-01-19 17:14:00 81

转载 OC——UIlabel text的常规应用

UILabel *downloader = [[UILabel alloc]init]; NSString *downloadCount = [[LibraryArr objectAtIndex:indexPath.row]objectForKey:@"downloadCount"]; UILabel *visitCount = ...

2016-01-19 11:41:00 114

转载 二维数组在text,image的应用

NSArray *imageArr = @[@[@"查看地图",@"map_hy.png"], @[@"联系号码",@"phone_hy.png"], @[@"我要咨询",@"zixun_hy.png"], ...

2016-01-18 18:06:00 61

转载 消除多余的row

tableviewName.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];  转载于:https://www.cnblogs.com/LeoMabi/p/5140076.html

2016-01-18 18:03:00 101

转载 tablbView中section的间距

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ if (section == 3) { return 0; } return 10;}- (UIView *)tableView:(UITa...

2016-01-18 18:02:00 117

转载 OC——网络解析获取图片的应用

headimageView=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, DEVW, DEVW/2)]; headimageView.contentMode = UIViewContentModeScaleAspectFit; NSString *strImg = [strJson obje...

2016-01-18 15:22:00 217

转载 OC——动态添加Button和监听UIAlertView按钮

1:动态添加uibutton- (IBAction)addButton:(id)sender { CGRect frame = CGRectMake(90, 200, 200, 60); UIButton *someAddButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; someA...

2016-01-14 15:11:00 296

转载 计算UILabel的高度

//计算文本高度 NSString *lltxt =[[NSString alloc]initWithFormat:@"浏览:%@",[strJson objectForKey:@"visitCount"]]; NSString *xztxt =[[NSString alloc]initWithFormat:@"下载:%@",[strJson objectFo...

2016-01-11 15:34:00 113

转载 计算textview的高度

1.计算输入文字在指定字体、指定容器和指定换行方式下的size. CGSizeconstraintSize; constraintSize.width=300; constraintSize.height=MAXFLOAT; CGSizesizeFrame =[textContent sizeWithFont:textView...

2016-01-11 15:18:00 214

转载 OC——NSDictionary和NSMutableDictionary

//初始化 NSString *key1 = @"key1"; NSString *key2 = @"key2"; NSString *key3 = @"key3"; NSString *key4 = @"key4"; NSString *key5 = @"key5"; NSS...

2016-01-08 14:14:00 109

转载 OC——NSArray和NSMutableArray

/*---------------------NSArray---------------------------*///创建数组NSArray *array1 = [NSArray arrayWithObject:@"1"];NSArray *array2 = [NSArray arrayWithObjects:@"1",@"2",@"3", nil];NSArra...

2016-01-08 11:39:00 100

转载 Objective-C——NSMutableURLRequest发送POST请求,使用NSJSONSerialization解析JSON字符串

NSString *reqData = @"Data=";NSData *postDatas = nil;NSString *urlPath = @"url";//组json字符串数据NSMutableDictionary *mulDic = [[[NSMutableDictionary alloc] init] autorelease];[mulDic se...

2016-01-08 11:35:00 152

转载 OC——NSString的常用方法

NSString *str1 = @"BeiJing";NSString *str2 = @"beijing";//全部转为大写NSLog(@"%@",[str1 uppercaseString]);//全部转为小写NSLog(@"%@",[str1 lowercaseString]);//首字母大写NSLog(@"%@",[str1 capi...

2016-01-08 11:30:00 99

转载 OC——NSString和NSMutableString

int main(int argc, const char * argv[]){ @autoreleasepool { //----------------NSString----------------------------- NSString *str1 = @"这是一个字符串常量"; ...

2016-01-08 10:49:00 102

转载 OC——封装(初级与高级)

所谓的封装,就是通过定义方法或者函数去操作成员属性或者成员变量,而不是直接通过指针方式去操作。借此达到提高代码安全性,代码可行性以及代码执行效率的目的。1:初级封装,对成员变量进行封装。#import <Foundation/Foundation.h>@interface Person : NSObject{ // @public ...

2016-01-05 16:18:00 118

转载 Swift和Objective-C的差异性

1:Type Swift提供了类型推断,不需要人工的去注释变量的类型信息,编译器会通过变量的值来推断类型。例如,编译器可以自动将该变量设置为字符串:// 自动推断,不显示var name1 = "Matt"// 显示类型var name2:String = "Matt"  这也就意味着类型安全,编译器(在绝大多数情况下)知道对象的所有类型,这使得编译...

2016-01-05 16:17:00 94

转载 OC——类

1.Objective-C是C语言的超集,完全兼容C语言2.所有的关键字都以“@”开头,例如:@interface,@class,@implementation3.Objective-C的所有对象必须继承于NSObject,并且不存在多继承4.Objective-C支持协议,支持多态5.Id类型 类似泛型对象,void* 类似任意的指针类型“-”表示对象方法“+”...

2016-01-03 13:32:00 109

转载 UIAlertController的创建以及添加

个人还是更喜欢以前的UIAlertView的创建方法,更新后的UIAlertController虽然说将UIAlertView和UIActionSheet的功能和作用以一种模块化替换的方式来代替,但是却给人一种多此一举的感觉,原先一步到位变成了现在就连一个取消或者“OK”按钮都需要通过Add来添加才能实现,说是画蛇添足也不为过。importUIKitclassViewCo...

2015-12-29 20:41:00 94

空空如也

空空如也

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

TA关注的人

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