ITeye博客

RbBtSn0w

woainike · 共 46 篇文章

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

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

2013-09-04 23:00 · iPhone · java · AWS (Amazon Web Server) · 评论(0)

UIRefreshControl for Tableview or TableViewController

@interfaceViewController () //@property (nonatomic,strong) UITableView *myTableView; @property (nonatomic,strong) UITableViewController *myTableViewController; @end @implementation ViewController -(void)refreshView:(UIRefreshControl *)refresh { refresh.attributedTitle = [[NSAttributedStringalloc] i…

2013-06-26 00:06 · iPhone · 评论(0)

Install Tomcat 7 on Amazon EC2 Ubuntu

Install Tomcat 7 on Amazon EC2 Ubuntu Install tomcat7 sudo apt-get install tomcat7 Start tomcat7 sudo service tomcat7 start Stop tomcat7 sudo service tomcat7 stop Restart tomcat7 sudo service tomcat7 restart Tomcat7 runs on port 8080 by default. Remember to add port 8080 to the security group in th…

2013-06-25 13:55 · AWS (Amazon Web Server) · 评论(0)

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 of formats but for several reasons I chose to go with JSON. So here are the steps to perform a JSON query to Go…

2013-06-09 22:47 · iPhone · 评论(0)

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

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

2013-06-06 22:23 · iPhone · 评论(0)

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 = [[NSBundle mainBundle] loadNibNamed:@"MyCustomView" owner:self options:nil]; UIView *mainView = [subviewArray objectAt…

2013-03-20 15:52 · iPhone · 评论(0)

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 the problem occurs because Xcode believes the working copy has uncommitted changes (even though the Co…

2012-11-28 21:23 · iPhone · 评论(0)

git for windows

bulid 环境 scp 提交的命令 //file scp bug记录.rtf git@10.10.110.112:/cygdrive/d/GitRepos //doucment scp -r myDocument git@10.10.110.112:d:/GitRepos 默认是var,且是在windows下面的ssh的home目录 URL 的方式 git://host/path/to/repos.git ssh://user@host/path/to/repos.git user@host:path/to/repos.git file://path/to/repos.git /path/…

2012-11-21 10:51 · iPhone · 评论(0)

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

#import <UIKit/UIKit.h> @interface ViewController : UIViewController{ NSMutableArray *_mArray; NSMutableArray *temp; } @property(nonatomic ,retain)NSMutableArray *mArray; @end #import "ViewController.h" @interface ViewController () @end @implementation ViewController @synthesize mArray = _mArray; -…

2012-11-14 16:42 · iPhone · 评论(0)

cookie观察

NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (NSHTTPCookie *cookie in [cookieStorage cookies]) { NSLog(@"All cookie info /n %@", cookie); //test/ NSArray *cookies = [NSArray arrayWithObjects:cookie, nil]; NSDictionary *testD = [NSHTTPCookie requestHeaderFi…

2012-10-24 12:51 · iPhone · 评论(0)

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

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

2012-10-11 11:40 · iPhone · 评论(0)

Mac os 命令

打开终端输入命令: defaults write com.apple.finder AppleShowAllFiles -bool true KillAll Finder 隐藏 命令: defaults write com.apple.finder AppleShowAllFiles -bool false KillAll Finder create git project for Null git version git init git add . git commit -m "Initial commit" 随时删除 find . -name .svn -print0 | xargs …

2012-09-22 11:43 · iPhone · 评论(0)

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 : NSObject + (void)dismissKeyboard; + (void) globalResignFirstResponder; + (void) globalResignFirstResponderRec:(UIView*) vie…

2012-09-17 17:15 · iPhone · 评论(0)

实效API

iOS6 之后 presentModalViewController 实效,过期了 Presents a modal view managed by the given view controller to the user. (Deprecated in iOS 6.0. Use presentViewController:animated:completion: instead.) Parameters viewControllerToPresent The view controller being presented. flag Pass YES to animate the pre…

2012-08-02 12:04 · iPhone · 评论(0)

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 home screen. Default.png (also known as your “launch image”) provides the splash screen dis- played during application launch. Unlik…

2012-07-25 21:10 · iPhone · 评论(0)