自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

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

转载 笔记

布局行列关系 列与X轴 行与Y轴列% 行/1.//获取当前屏幕的宽度CGFloat swidth = [UIScreen mainScreen].bounds.size.width;//边界到控件的距离int space = (swidth - 260)/2;for (int i = 0; i<9; i...

2015-08-27 20:47:00 156

转载 ui

#import "ViewController.h"#import "Person.h"@interface ViewController ()<UITextFieldDelegate, UIAlertViewDelegate>{ UIImageView *_imgView; NSMutableArray *_personsArra...

2015-08-26 21:10:00 144

转载 ui-label button

#import "AppDelegate.h"@interface AppDelegate ()@end@implementation AppDelegate{ //全局变量 UILabel*lablel;}-(void)dealloc{ self.window=nil; [super dealloc];}...

2015-08-25 20:43:00 163

转载 ui-uiwindow uiview

main#import <UIKit/UIKit.h>#import "AppDelegate.h"//UIApplication对象:这是应用程序的象征,是iOS程序第一个创建的对象。每一个程序都有自己的UIApplication对象//UIApplication对象的创建:[UIApplication sharedApplication],利用这个单例...

2015-08-25 20:42:00 181

转载 草稿-九宫格

#import "AppDelegate.h"@interface AppDelegate ()@property(nonatomic,strong)NSArray*app;@end@implementation AppDelegate-(NSArray *)app{ if (_app == nil) { NSStr...

2015-08-25 20:38:00 192

转载 草稿

#import <UIKit/UIKit.h>#import "AppDelegate.h"/*UIApplication:这个应用程序的象征,是程序第一个创建的对象,每个程序都有自己的 UIApplication对象 UIApplication对象的创建:[UIApplication sharedApplication];利用这个单利对象,能进行应用级别...

2015-08-24 12:04:00 137

转载 ios文件管理

#import <Foundation/Foundation.h>#define PATH1 @"/Users/aoyolo5/Desktop/文件管理"#define PATH2 @"/Users/aoyolo5/Desktop/文件管理/name.txt"#define PATH3 @"/Users/aoyolo5/Desktop/array.plist"...

2015-08-19 20:15:00 121

转载 iOS -归档

Student.h#import <Foundation/Foundation.h>@interface Student : NSObject<NSCoding>@property (nonatomic, copy) NSString *name;@property (nonatomic, assign) int ID;@end...

2015-08-19 20:13:00 117

转载 8.ios-Protocol

BoosProtocol.h#import <Foundation/Foundation.h>//创建协议@protocol BoosProtocol <NSObject>@required//必须实现的方法-(NSInteger)buyWood;@optional//可选实现-(void)text3;@endW...

2015-08-19 19:26:00 113

转载 7.ios-分类 继承 extention

Person.h#import <Foundation/Foundation.h>@interface Person : NSObject-(void)eat;@end//2.第二种方法//分类的声明//创建分类@interface <#class name#> (<#category name#>)@i...

2015-08-19 18:06:00 135

转载 笔记-数组与字典中文化实现打印

NSArray+LogNSArray+Log.h#import <Foundation/Foundation.h>@interface NSArray (Log)@endNSArray+Log.m#import "NSArray+Log.h"@implementation NSArray (Log)- (NSString...

2015-08-18 21:04:00 114

转载 题目-通知-NSNoticafiction

Person.h#import <Foundation/Foundation.h>@interface Person : NSObject@property(nonatomic,copy)NSString*name;@property(nonatomic,assign)long int ID;-(void)addObserver;//添加观察者...

2015-08-18 18:03:00 122

转载 题目-单例

Student.h#import <Foundation/Foundation.h>@interface Student : NSObject@property (nonatomic, copy) NSString *name;- (instancetype)initWithName:(NSString *)name;//单例:defa...

2015-08-18 16:38:00 157

转载 题目-本地存储-程序运行次数

#import <Foundation/Foundation.h>int main(int argc, const char * argv[]) { @autoreleasepool { /* 本地存储(数据持久化): 1.NSUserdefaults 2.NSCoding...

2015-08-18 16:31:00 133

转载 题目-字典

Person.h#import <Foundation/Foundation.h>@interface Person : NSObject@property (nonatomic, copy) NSString *userName;@property (nonatomic, copy) NSString *password;@property ...

2015-08-17 21:09:00 127

转载 iso-block

#import <Foundation/Foundation.h>void test(void (^block1)()){ block1();}void test2(int (^blk2)(int, int)){ int sum = blk2(10, 20); NSLog(@"%d",sum);}int...

2015-08-17 21:06:00 120

转载 题目-协议

协议概念Protocol(协议)(一)简介1.Protocol:就一个用途,用来声明一大堆的方法(不能声明成员变量),不能写实现。2.只要某个类遵守了这个协议,就拥有了这个协议中的所有方法声明。3.只要父类遵守了某个协议,那么子类也遵守。4.Protocol声明的方法可以让任何类去实现,protocol就是协议。5.OC不能继承多个类(单继承)但是能够遵守多个...

2015-08-17 21:04:00 187

转载 6.ios-类存管理与分类

知识点 1.自动释放池 2.继承与多态========================自动释放池 1.什么是自动释放池 2.自动释放池的作用 1)思考:如何释放在函数中需要返回的对象 3.如何创建一个自动释放池 @autoreleasepool{} --- IOS5.0以后 4.自动释放池如何释放对象内存 1)autorelease消息 作用:表示延时一会再释放...

2015-08-17 20:55:00 193

转载 5.ios-内存管理

知识点 1.内存管理作用 2.内存管理原理 3.黄金法则 4.setter/getter 5.属性======================================内存管理 1.回忆:c语言中通过那些函数实现的内存管理 c malloc free 空指针 if (xxx != null){free;} 1)堆空间释放有哪些麻烦的地方 2)如何防止多次释放...

2015-08-17 20:52:00 123

转载 字符串

字符串1.比较两个字符创是否相等if([Str1 isEquarToString:str2])2.比较两个字符串是否为同一个对象if([Str1 isEquarToString:str2]) if(Str1==str2)3.比较字符串的大小NSComparisonResult result=[string1 caseInsensitiveCompare:string2] ...

2015-08-13 20:07:00 118

转载 4.ios-NSdictional

知识点 1.NSDictionary 2.NSMutableDictionary===========================NSDictionary 1.思考:现在需要通过名字查找到指定的电话号码 1)通过NSArray是否可以实现 2)是否容易实现 2.NSDictionary 1)如何创建一个字典对象 dictionaryWithObjectsAnd...

2015-08-13 18:51:00 140

转载 3.ios-NSarray下

#import <Foundation/Foundation.h>#import "Person.h"int main(int argc, const char * argv[]) { @autoreleasepool {#pragma make创建数组 //数组中得元素,必须是对象 //通过实例方法创建...

2015-08-12 23:35:00 106

转载 ios-oc数据类型

#import <Foundation/Foundation.h>int main(int argc, const char * argv[]) { @autoreleasepool { /*在这里主要说一下数据类型:NSString字符串、NSDate日期、NSArry数 NSDictionary字典。*/ ...

2015-08-12 16:05:00 146

转载 3.ios-NSarray

知识点 1.NSArray 2.NSMutableArray 3.字符串的 NSArray NSDictionary NSSet 数据集合 (collections)============================NSArray---NSMutableArray 1.NSArray对象的创建 2.如何创建一个数组 1)通过alloc创建 init 2)ar...

2015-08-12 15:46:00 171

转载 2.ios-NSstring

知识点 1.NSString 类的使用 2.NSMutableString 类的使用=================================NSString 0.NSString对象 1.为什么需要NSString对象 2.oc中字符串和c语言字符串的对比 1)输出方式 2)引用方式 NSString以@符号开头,表示该字符串是一个oc类型的字符串 c语言字符串...

2015-08-12 08:55:00 152

转载 1.ios

知识点 1.Objective-c Hello World 2.NSLog使用 3.面向对象编程思想--类和对象 4.类的定义和使用 5.面向对象编程思想--封装 6.声明和实现相分离 7.类的实例化--对象 IDE===========================================Objective-c hello world 1.objective-c历史 h...

2015-08-11 18:09:00 241

转载 c语言》查找法-数组下标

1.查找某数下标#include <stdio.h>int main(int argc, const char * argv[]) { int a[10]={3,2,0,4,5,8,9,7,6,1}; int a1; int i=0; printf("请输入数值:"); scanf("%d",&a1);...

2015-08-07 11:19:00 2779

转载 c语言》排序法

排序法1.选择排序法思路:在自定义函数中定义两个局部变量i,j;i<数组长度;j=i+1 j<数组长度;if(array[i]<array[j]){//if(array[i]<array[j])可省略int t,t=array[i];array[i]=array[j];}主函数输出:printf("%d",array[i]);...

2015-08-07 10:39:00 103

空空如也

空空如也

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

TA关注的人

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