Analytics

2014年11月24日 星期一

[Android] Set proper JDK on Mac

Got a error on Android Studio, it said that it need JDK7.

Found that: if you install java8 update25, which is the newest Java update on Mac, the default JDK is 6 not 7.

official info: http://support.apple.com/kb/DL1572

But the Android studio default recommend JDK version is 7.

So you need to download the JDK7 from here:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

1.Open the dmg, and install.

2.In your android studio, go to File> Project Structure> SDK Location

3.In "JDK location" click on browse and go to /Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
(Note :- Its Not /System/Library it's /Library)

4. apply, then ok!

2014年11月15日 星期六

[ios]Xcode 外掛套件推薦

首先,是絕對必裝的套件管理程式 Alcatraz
http://alcatraz.io/

超級方便,直接透過他就能搜尋想要的Xcode套件

安裝方法,請直接到終端機下以下指令
$ curl -fsSL https://raw.github.com/supermarin/Alcatraz/master/Scripts/install.sh | sh
重開Xcode即可在工具列 Window > Package Manager 找到


-顏色套件Color Theme - Zenburn by colinta

2014年5月28日 星期三

[ios] 兩個viewcontroller之間傳值, Passing value between two viewcontroller


A viewcontroller --> B viewcontroller

有兩個方法
1. delegate - 適合非storyboard的狀況,或是用storyboard但啟動B viewcontroller的時候非用storyboard segue的方式(只拿storyboard來刻畫面,但不在storyboard中進行畫面切換設定)

2. (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
適合storyboard狀況


參考:

Delegate的使用方法,ola大大這篇寫的很好,要是當年第一次接觸delegate就有這篇,也不會一把鼻涕一把眼淚的學T_T
http://wangshifuola.blogspot.tw/2012/02/iosdelegate.html

使用 Storyboard Segue 實作 UIViewController 的切換(下)
http://furnacedigital.blogspot.tw/2011/12/storyboard-segue-uiviewcontroller.html


Storyboard里面的几种Segue区别及视图的切换:push,modal,popover,replace和custom
http://blog.csdn.net/piziliweiguang/article/details/8080426