show code js
2012年12月14日 星期五
new method of last xcode version
Xcode 4.5.2
1.create a project : new_project
2.add a button in viewcontroller
3.hold right button of mouse and to new_projectViewController.h, will create a class : set name as myButton
4.hold right button of mouse and to new_projectViewController.m, it will create a function : use id , and set name as myButton
5.in function add some code
[sender setTitile:@"click"forState:normal];
6.run simulator
7.click button will change title to "click"
those different old version of xcode ...
2012年9月23日 星期日
simple example
1.open Xcode
2.set project config
3.choose Single View Application
4.open MainStoryboard.storyboard
(A)Add a label to frame in view controllor 1
(B)Add a button to frame in view controllor 1
5.add a view controller is 2
6.create a second page
(A)click and hold right mouse button on button in view controller 1
(B)move mouse fouce to view controller 2 and release mouse button
(C)choose modal
7.create some code
(A)open (name)AppViewController.h
(B)add code in @interface xxx : UIViewController { ....(in here)... } @end
(C)code > IBOutlet UIButton *myButton;
(D)open (name)AppViewController.m
(E)add code in viewDidload{ [super viewDidload]; ....(in here)... }
(F)code > [myButton setTitle:@"Hello" forState:UIControlStateNormal];
8.Run
2012年9月12日 星期三
open svn function on mac
- Open Function
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/svn /usr/bin/svn
- Checkout
mkdir svn_project
cd svn_project
svn checkout http://domain/svn/trunk
ls.....
svn_project/trunk/ code .......
2012年9月9日 星期日
mac disable double .filename and .ds_store
Open terminal and command below to disable.
If you want enable them, use reverse like true => false or false => true
- Disable .DS_Store
- Disable Apple Double (.filename)
git on mac
Server:
1.get dropbox account and download & install dropbox
2.download and install git
3.goto dropbox directory
(A)mkdir project [for all git root]
(B)cd project and mkdir new_project.git
(C)cd new_project.git and command:git init --bare [to format]
Client:
1.New directory
(A)mkdir a project
(B)cd project
(C)git init
(D)git remote add origin ~/Dropbox/project/myproj.git
2.from a project
(A)git init or git clone ~/Dropbox/project/myproj.git [to format and get code from git server]
(B)git remote add origin ~/Dropbox/project/myproj.git
3.add new document to git server
(A)git add filename.xxx
(B)git commit {-a} -m "Add a filename.xxx"
(C)first time:git push origin master, next time:git push
4.modify and update to git server
(A)git commit -m "desc:modify"
(B)first time:git push origin master, next time:git push
5.update from git server
(A)first time:git pull origin master, next time:git pull
6.add ignore:
add a .gitignore in project root directory and set
data/*
xml/*.dat
password.file
7.see log
(A)git log
8.mirror a new project :
mkdir ../new_directory
git archive master | tar -x -C ../new_directory
2012年9月8日 星期六
zend studio
- download from www.zend.com
- install Zend Studio trial on mac
- open zend studio
- change encoding
- open Preferences>General>Workspace
- see "Text file encoding" and modify it to utf-8
- hide .svn
- right click item
- Build Path -> Configure Inclusion / Exclusion Filters… .
- in "Exclusion patterns" click add and keyin "**/.svn/" before click ok button
- click finish button
- install language package
- click help and install new software
- keyin "http://archive.eclipse.org/technology/babel/update-site/R0.9.1/helios/" in work with and enter to waiting pending
- pending finish will list more package let you choose
- checkbox "Babel Language Packs in [language name]", click next
- click allow or finish to waiting for install package
訂閱:
文章 (Atom)