热门 最新 精选 话题 上榜
经常比较疑惑NSArray、NSDictionary、NSSet这几个对象容器管理对象所采用的方式是“强引用”还是“弱引用”。 通过简单的命令行程序得到的结论是“NSArray、NSDictionary、NSSet这几个容器都是强引用容器”。 打开Xcode,新建project,选择“OS X”-“Application”-“Command Line Tool”,完成project的创建,默认情况
转载 6天前
23阅读
用户就不能像安卓用户那样能够直接往手机里拷自己喜欢的音视频文件,如果你的程序支持拷贝文件进去,并且能够显示在程序中。那么就需要以下配置了:在应用程序的Info.plist文件中添加UIFileSharingEnable
翻译 6天前
43阅读
iOS如何让程序能够支持文件共享
tableview的cell、高度,或者需要滚动tableview,那么,直接在reloadData后执行代码是有可能出问题的。reloadDate并不会等待tableview更新结束后才返回,而是立即返回,然后去计算表
转载 6天前
28阅读
http://demo.netfoucs.com/quanqinyang/article/details/43939245imageWithRenderingMode这个方法。UIImage去掉渲染只能在IOS7或者以上的系统使用UIImage *img = [UIImage imageName:@"xxxx"];img= [img imageWithRenderingMode
转载 6天前
20阅读
Frame:其位置坐标是相对于对于父view,  例如 view.frame为(100,100,200,50)bounds:其位置坐标是相对于自己,例如:view.bounds 为(0 , 0 , 200, 50)clipsToBounds:是类View的属性,如果设置为yes,则不显示超出父View的部分masksToBounds:是类CALayer的属性,如果设置为yes,则不显示超
转载 6天前
19阅读
http://mobile.51cto.com/iphone-278413.htmiPhone程序开发 KVO/KVC实现机理分析是本文要介绍的内容,不多说,直接进入话题。我们来看详细内容。KVO)机制,非常不错,可以很好的减少浇水代码。关于KVO的学习,可以参考文章:《Key-Value Observing快速入门》:http://www.cocoadev.cn/Objective-C
转载 6天前
19阅读
本文参考了如下文章:http://mobile.51cto.com/iphone-278413.htm有些时候在使用OC的kvc,kvo时我们最好要搞清楚其内部的实现原理,这样比较好Key-Value Coding(KVC)实现原理分析KVC运用了一个isa-swizzling技术。isa-swizzling就是类型混合指针机制。KVC主要通过isa-swizzling,来实现其内部查找定位的。i
yout的子类)UICollectionViewFlowLayout *fl = [[UICollectionViewFlowLayout alloc]init];//初始化collecti
转载 6天前
33阅读
UICollectionView--使用系统UICollectionViewFlowLayout布局类
// 根据状态做事情 if (state == MJRefreshStateIdle) { if (oldState != MJRefreshStateRefreshing) return; // 保存刷新时间 [[NSUserDefaults standardUserDefaults] setObject:[NSDate
原创 6天前
48阅读
h
转载 6天前
26阅读
简介:上篇我们讲到了KVC,这篇我们学习KVO,全名为:Key Value Observing,直译为:基于键值的观察者。那它有什么用呢?KVO主要用于视图交互方面,比如界面的某些数据变化了,界面的显示也跟着需要变化,那就要建立数据和界面的关联。ObjC中提供的KVO就是解决这种问题的。以下用显示页面观察学生的课程名称变化的例子来说明KVO的使用。学生类命名为:Student,页面类是:Page
转载 6天前
23阅读
Objective-C语法之KVO的使用
一直搞不懂在OC中变量在@interface和@implementation中有什么区别,定义@property又有什么不同,查了很多资料,总结如下://ViewController.h @interface ViewController : UIViewController { NSInteger a; } @property (nonatomic,assign) NSInteger
转载 6天前
24阅读
--------
转载 6天前
26阅读
Xcode如何查看内存中的数据
http://ww
原创 6天前
48阅读
;    NSDate *fromdate=[NSDate date];    time=(long)[fromdate timeIntervalSince1970];    retu
转载 6天前
22阅读
址为http://blo
http://www.2cto.com/kf/201202/118291.htmliOS提供了使用其他app预览文件的支持,这就是Document Interaction Co
转载 6天前
21阅读
iOS LLDB 调试方法frame select 当前运行在那段代码thread list 当前列出全部线程thread info 输出当前线程的信息source list 显示当前的源代码expr expr+表达式 调试时执行表达式并打印结果bt 打印调用堆栈c 继续运行参考:http://blog.sina.com.cn/s/blog_6dce99b10101
原创 6天前
38阅读
1.BSD socket #ifndef __XOSSTACK_DEFS_LINUX_H__ #define __XOSSTACK_DEFS_LINUX_H__ #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/socket.h&gt
转载 6天前
26阅读
者删除节点的时候,根据不同情况,旋转的次
转载 6天前
19阅读
SQL 语句详解 /* CREATE TABLE IF NOT EXISTS t_student (name text, age integer); */ /* INSERT INTO t_student (name, age) VALUES ('xiaoming', 13); */ /* UPDATE t_student SET age = 24 WHERE name = 'xiao
SQL
原创 6天前
42阅读
是请求Repo A的所有者从你的A2合并分支。如果被审核通过并正式合并,这样你就为项目A做贡献了
q
原创 6天前
46阅读
- (void)shake{ CABasicAnimation *moveAnimation = [CABasicAnimation animationWithKeyPath:@"position.x"]; moveAnimation.byValue // Here's the importan
原创 6天前
41阅读
////  ViewController.m//  test_shapeLayer_01////  Created by admin on 1/28/16.//  Copyright © 2016 jeffasd. All rights reserved.//#import "ViewCont
判断给定的点是否被一个CGRect包含,可以用CGRectContainsPoint函数 BOOL contains = CGRectContainsPoint(CGRect rect, CGPoint point); 判断一个CGRect是否包含再另一个CGRect里面,常用与测试给定的对象之间是否又重叠 BOOL contains = CGRectContainsRect(CGRect
转载 6天前
30阅读
// // VerticalAlign.m // test_ Input_01 // // Created by admin on 4/22/16. // Copyright © 2016 jeffasd. All rights reserved. // #import "VerticalAlign.h" @implementation VerticalAlign - (void)a
原创 6天前
59阅读
http://www.07net01.com/program/2015/12/1017687.html iOS autolayout机制相关方法1. - (CGSize)sizeThatFits:(CGSize)size 2. - (void)sizeToFit ——————- 1. - (void)layoutSubviews 2. - (void)layoutIfNeeded 3. - (v
转载 6天前
23阅读
Thanks pointValue didn't work on iPhone OS but CGPointValue did, luckily, as that's the one I needed. That seems to be a UIKit extension. I've switched to that. was my original method (apart from b
原创 6天前
56阅读
本使用git是一个分布式代码管理工具,所以可以支持多个仓库,在git里,服务器上的仓库在本地称之为remote。直接clone一个仓库:$: git clone git@
转载 6天前
20阅读
C/C++编程中当要读写一些简单的文本文件时,可以使用fgets和fputs函数来操作相关的文件。fgets是从文件中获