自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 个人网站建立了,后期数据移步www.rbbtsn0w.com

个人网站建立了,后期数据移步www.rbbtsn0w.com

2013-09-04 23:00:11 150

原创 UIRefreshControl for Tableview or TableViewController

 @interfaceViewController ()//@property (nonatomic,strong) UITableView *myTableView;@property (nonatomic,strong) UITableViewController *myTableViewController; @end @implementation View...

2013-06-26 00:06:04 136

原创 Install Tomcat 7 on Amazon EC2 Ubuntu

Install Tomcat 7 on Amazon EC2 Ubuntu Install tomcat7sudo apt-get install tomcat7Start tomcat7sudo service tomcat7 startStop tomcat7sudo service tomcat7 stopRestart tomcat7sudo service ...

2013-06-25 13:55:06 116

原创 About search your address on MKMapView.

When you have address it's a string, how to get geocoding ? In ios5 ago, use google service.  As was mentioned before, the best thing to do is to use the Google Maps API, it supports a lot ...

2013-06-09 22:47:53 266

原创 针对UIBarButtonItem 下面的backbutton,一个很简单自定义方式。

如果只需要用图片替换原来的back button,不需要里面的内容的时候。一个最简单的办法就是 //Give a image    UIImage* backImage = [[UIImageimageNamed:@"BackButton"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 20, 0, 0)];//Set im...

2013-06-06 22:23:30 150

原创 Custom your view and load in code. It's difference viewcontrolller.

 You need to load it using the -loadNibNamed method. -initWithNibName is only for UIViewControllers.Add the following code to your MyCustomView init method:  NSArray *subviewArray = [[NSBun...

2013-03-20 15:52:19 80

原创 Xcode, git and .DS_Store

On trying to merge two git branches, I’ve often found Xcode 4 displays “Branches not found” in the Merge dialog, despite the Organiser clearly recognising multiple branches for the repo.It seems ...

2012-11-28 21:23:46 106

原创 git for windows

bulid 环境   scp 提交的命令 //filescp bug记录.rtf git@10.10.110.112:/cygdrive/d/GitRepos//doucmentscp -r myDocument git@10.10.110.112:d:/GitRepos默认是var,且是在windows下面的ssh的home目录U...

2012-11-21 10:51:16 152

原创 无聊的测试。release后还需要removeallobjects?

#import <UIKit/UIKit.h>@interface ViewController : UIViewController{ NSMutableArray *_mArray; NSMutableArray *temp;}@property(nonatomic ,retain)NSMutableArray *mArray;@e...

2012-11-14 16:42:03 96

原创 cookie观察

         NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];        for (NSHTTPCookie *cookie in [cookieStorage cookies]) {            NSLog(@"All cookie info ...

2012-10-24 12:51:00 71

原创 iOS6对于shouldAutorotateToInterfaceOrientation的改动以及其他一些窗口相关细节

OS6正式版发布当天博主我就更新了,随后也更新了对应的XCode以及iOS SDK,更新到了4.5 (4G182)。然后更新原有4.4 iOS5 SDK的项目,目前最主要的发现就是iOS6对于app屏幕朝向支持以及自动旋屏时的处理方式的变动。简而言之就是iOS6下的- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInter...

2012-10-11 11:40:12 160

原创 Mac os 命令

  打开终端输入命令:defaults write com.apple.finder AppleShowAllFiles -bool trueKillAll Finder 隐藏 命令:defaults write com.apple.finder AppleShowAllFiles -bool falseKillAll Finder   create...

2012-09-22 11:43:50 109

原创 DisMiss Keyboard,自定义的工具类

 //// Keyboard.h// CustomAddress//// Created by Snow on 9/17/12.// Copyright (c) 2012 Snow. All rights reserved.//#import <Foundation/Foundation.h>@interface Keyboard :...

2012-09-17 17:15:07 257

原创 实效API

iOS6 之后presentModalViewController  实效,过期了 Presents a modal view managed by the given view controller to the user. (Deprecated in iOS 6.0. UsepresentViewController:animated:completion:...

2012-08-02 12:04:46 150

原创 The Icon and Default Images

  The icon.png image and Default.png are two key image files. Icon.png acts as your appli-cation’s icon, the image used to represent the application on the SpringBoard homescreen. Defa...

2012-07-25 21:10:58 92

原创 APP 图片比例和名称规范 ,最新iPhone5比例

从icon说起命名方法,举例  iPhone & iPod touchiPadIcon.png                         57×57Icon-72.png                  72×72Icon-Small.png             29×29Icon-Small.png             29×29 iPad Spot...

2012-07-25 21:10:23 120

原创 xcode的各个版本的下载地址

现在进入apple的developer网站,默认只提供最新的xcode下载的地址,当前最新的是xcode4.1.1,而且只能装在最新的Lion的操作系统上,还是通过AppStore下载安装的,如果是使用比较老的操作系统,或不习惯使用xcode4,那我们就只能下载以前版本的xcode了,几个以前的xcode的下载版本的地址如下: xcode3.2.6https://develope...

2012-03-29 10:51:21 142

原创 IP Address

   再来一篇,获取本地IP,三种方法:(1)在Day 4教程里面的NSHost(http://appsamuck.com/day4.html)也能取到IP,不过是私有的API (2)从C struct的地址取(http://stackoverflow.com/questions/3538365/iphone-get-ip-address-of-the-current-wifi),...

2012-03-14 17:39:46 89

原创 Copy Functions

  Copy Functions  在一般情况下,一个标准的复制操作,也可能被称为简单的任务,当您使用=操作符指定一个变量的值到另一个。例如,表达myInt2= myInt1导致整数内容的myInt1用于myInt1到由myInt2使用的内存的内存复制。两个独立的区域内存在复制操作,包含相同的值。然而,如果试图以这种方式复制的核心基础对象(Core Foundation obj...

2012-03-06 15:47:16 93

原创 UILabel 中Line Breaks属性.

Clip  Character WrapWord Wrap Truncate HeadTruncate MiddleTruncate Tail  #import "LabelTestViewController.h" @implementation LabelTestViewController /* Access...

2012-02-29 14:16:51 145

原创 ios5 中文键盘高度变高覆盖现有ui问题的解决方案(获取键盘高度的方法)

 背景:  ios5之前,iphone上的键盘的高度是固定为216.0px高的,中文汉字的选择框是悬浮的,所以不少应用都将此高度来标注键盘的高度(包括米聊也是这么做的)。  可是在ios5中,键盘布局变了,尤其是中文输入时,中文汉字选择框就固定在键盘上方,这样就使得原本与键盘紧密贴合的界面视图被中文汉字选择框给覆盖住了。一方面影响了界面的美观,另一方面,如果被覆盖的部分就是文本输入框的...

2012-02-21 18:01:53 88

原创 根据Debug和Release状态的变化来屏蔽日志输出

我们平时在开发应用的时候,经常会用到 NSLog 来调试我们的程序,而随着项目越来越大,这些用于调试的日志输出就会变得很难管理。 发布正式版的时候一定要屏蔽掉所有后台输出,因为这些输出还是比较消耗系统资源的。  往往到了这个时候,我们不得不去一行一行的找到 NSLog 调用,然后注释掉。 这样做在项目小的时候还比较有效,但随着项目规模的增长,就会变得越来越难控制。  下面就给大家介绍一个...

2012-02-06 15:41:26 119

原创 TextView自适改变高度

sizeWithFont:constrainedToSize:lineBreakMode:  Returns the size of the string if it were rendered with the specified constraints.- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGS...

2011-12-16 14:59:19 53

原创 NSURLConnection请求的,基本实现方法。

首先 在声明一个全局的 NSURLConnection 对象,然后在制定的加载方法里面实现请求,或者写一个测试方法或者类方法去实现。  NSString * str = @"http://woainike.iteye.com"; NSURL * nsURL = [NSURL URLWithString:str]; ...

2011-12-05 15:09:01 72

原创 基于Annotation的Struts2.0+Hibernate3.3+Spring2.5整合开发(3)

  进入我们基于Annotation的Struts2.0+Hibernate3.3+Spring2.5整合开发的最后一个阶段了,这阶段主要为我们的项目引进Struts2的Annotation。相对于带Annotation的Hibernate与带Annotation的Spring整合来说,带Annotation的Struts与带Annotation的Spring整合还是比较容易实现的。   ...

2011-11-29 23:50:02 185

原创 基于Annotation的Struts2.0+Hibernate3.3+Spring2.5整合开发(2)

基于Annotation的SSH整合开发,其实,并没有我当初想像中那么顺利。真正去做的时候,才发觉有许多问题。但不要紧,探索一下吧。在探索过程中学到知识,才是最重要的。   言归正传,现在,我们加入Spring的支持:把spring-framework-2.5.5dist中的spirng.jar引进我们项目的lib目录来,还要添加libaspectj下的两个jar包,以支持切面编程。...

2011-11-29 23:45:35 57

原创 基于Annotation的Struts2.0+Hibernate3.3+Spring2.5整合开发(1)

 写这个主题的文章在网络上应该暂时没有吧,也看过许多SSH整合开发的书,许多都是旧版本的框架整合,而且大部分都是以XML配置文件的方式,即使谈到Annotation也是针对其中一个框架而言的。随着开源框架更新版本中不断引进对Annotation的支持,使得我们可以用单方面去管理我们的类与关系,而不用像以往那样,一旦遇到问题,就要不断在Java视图和XML视图中切换。好,开始吧,既然网络中暂时没...

2011-11-29 23:38:07 72

原创 struts2之ModelDriven

可以根据Action属性的不同将它分为两类:Field-Driven(属性驱动) Action和Model-Driven(模型驱动) Action。 一、Field-Driven(属性驱动)Action,Action拥有自己的属性,这些属性一般是Java的基本类型。表单字段直接和Action的属性 对应。二、实现了modelDriven接口可以在action中直接获得例如User对象,它...

2011-11-28 17:11:01 59

原创 iOS5 自带json使用

    NSArray *valueArray = [@"val1 val2 val3" componentsSeparatedByString:@" "];     NSMutableDictionary *dict = [NSMutableDictionary dictionary];    for (NSString *each in [@"KeyA KeyB KeyC" ...

2011-11-17 16:19:31 137

原创 iphone singleton里面最常见的用法,正对delegate。

iphone singleton里面最常见的用法,正对delegate。由于apple在设计的时候,其实appdelegate本身就是一个singleton模式,在整个project中,你可以通过访问delegate来控制project里面的数据访问。  自己的一个总结,在。m里面通过+(MyAppDelegate*)sharedAppDelegate{    ret...

2011-11-14 11:08:41 49

原创 宏表达式

  在方法头上通过 #define ELTYPE(typeName) (NSOrderedSame == [elementName caseInsensitiveCompare:@#typeName])的写法,在方法里面的实用 - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)ele...

2011-11-14 11:01:49 198

原创 ibooks 3d 翻转效果 flip 3d

Bells And WhistlesThe iPhone has a set of nice transition animations which makes the experience using it very pleasant. But after a while one get so used of them that one stop noticing that ...

2011-11-04 16:14:17 85

原创 动画过场

动画过场效果,今天想到一个好的效果,来改变,两个图片只见的,一闪而过的效果, 其实,这个办法也就是,当前的图片是一定的,如果用另外一个图片去替换的花,那就用一个效果,就是 图片a图片b 过场:当前图片a,动画效果缩小,当达到自己规定的比例的时候,拿到最新的图片b,并且的初始的动画状态,为图片a,缩小后的大小,然后将图片b,放大到图片a,当初的位置和大小即可。  ...

2011-11-02 11:20:32 97

原创 iPhone开发技巧之环境篇--- 区分不同版本的iPhone

执行环境 可以从 UIDevice 的属性 model 得到在现在执行的环境。例子如下:  NSString *modelname = [[UIDevice currentDevice]model];if ([modelname isEqualToString:@"iPhone"]) {  // iPhone}if ([modelname isEqualT...

2011-10-27 13:52:01 121

原创 NSString与NSMutableString字符串操作:增、删、改字符串

NSString是定义固定大小的字符串,NSMutableString可变,可对字符串做增、删、改、插入等操作。源代码strings.m-----------------------------------#import <Foundation/Foundation.h>int main (int argc, const char * argv[]) {    N...

2011-10-25 12:47:39 67

原创 将ipone项目转到ipad平台,如果有多个xib文件

本文来源自:http://www.cocoachina.com/bbs/read.php?tid=41245类似参考还有:http://www.cocoachina.com/bbs/read.php?tid-31022.html将ipone项目转到ipad平台,如果有多个xib文件,该怎么办?1。 首先,不能把问题考虑复杂了,这个转化其实很简单。2。 将iphone版本升级成un...

2011-10-25 10:05:45 98

原创 如何检测iOS里安装的其它软件?

Bump 有一个小功能是给你身边的人交换应用程序;但是iOS是没有接口提供开发者去获取用户手机所安装的app的,但是,为什么Bump这款通过正规渠道(Appstore)下载的应用却能够获取用户安装应用清单呢?原来,我们还是有一些绕弯的方法来获得用户安装的软件的。网址:http://amitay.us/blog/files/how_to_detect_installed_ios_apps.php  ...

2011-10-24 14:20:59 243

原创 xcdoe4.2中,通过ARC来编译,总会遇到一些问题,比如原先使用c语言模块

很多时候,在使用Automatic Reference Counting的是时候,会提示一些很陌生的的错误提示,特别是使用conver to arc后, 比如bridged cast 给你的c代码上面加个_bridged。 这里面有个详细的描述, A bridged cast is a C-style cast annotated with one of thre...

2011-10-19 14:19:34 85

原创 ios5新特性,不断更新

明显的属性参数的改变retain ---strongassing ---unsafe_unretaind 这里面说明下,assing,assign指的就是派遣,分配.  为什么id<sthDelegate> delegate 用的是assign? elegate 实际上指向的是某个类的实例我的理解是assign 一般用在 int ,float 这...

2011-10-19 13:42:03 150

原创 iPhone开发资料之内存管理

开发iPhone 应用程序并不难,基本上就是三个词 - “memory, memory, memory” 。iPhone OS 对内存的要求很严格,有memory leak ,杀掉;内存使用超限额,杀掉。一个经过测试的程序,在使用过程中90%以上的崩溃都是内存问题造成的。在这里简单总结一下Object-C 内存管理。  基本概念  Object-C 的内存管理基于引用计数(Refer...

2011-10-19 11:46:38 66

空空如也

空空如也

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

TA关注的人

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