Time of Update: 2015-01-05
標籤:遍曆 nsarray 遍曆數組 ios 目前所知有七種方法 //第一種 [arr enumerateObjectsUsingBlock: ^(id obj, NSUInteger idx, BOOL *stop){ NSLog(@"%ld,%@",idx,[arr objectAtIndex:idx]);
Time of Update: 2015-01-05
標籤:ios object-c 遍曆 錯誤提示:產生錯誤的原因:當程式在執行遍曆時,同時又修改數組中的內容,導致崩潰.解決方案如下:方法1:定義一個一模一樣的數組,遍曆新數組的同時,對原數組進行操作修改.例如:NSMutableArray *arrayTemp = [@[@"aa",@"vv",@"bb"] mutableCopy];
Time of Update: 2015-01-05
標籤:listview viewholder baseadapter getview 代碼:public class ViewHolder { /** * @param view converView * @param id 控制項的id * @return 返回<T extends View> */
Time of Update: 2015-01-05
標籤:判斷手機瀏覽器終端裝置 var browser = { versions: function () { var u = navigator.userAgent, app = navigator.appVersion; return { trident: u.indexOf(‘Trident‘) > -1, //IE核心 presto: u.indexOf(‘Presto‘) >
Time of Update: 2015-01-05
標籤:ios爆炸的效果(IOS)by 伍雪穎 CAEmitterLayer *emitter = [CAEmitterLayerlayer]; emitter.frame =self.view.bounds; [self.view.layeraddSublayer:emitter]; emitter.renderMode
Time of Update: 2015-01-06
標籤:/** * 擷取UIColor對象的CMYK字串值。 */- (NSString *)getCMYKStringValueByColor:(UIColor *)originColor{ // Method provided by the Colours class extension NSDictionary *cmykDict = [selfgetCMYKValueByColor:originColor];
Time of Update: 2015-01-05
標籤:AndroidAnnotation是一個通過Annotation對代碼進行預先處理,簡化Android開發,加快開發速度,提高代碼可閱讀性的一個架構。它的主要思路是:用編譯時間Annotation對代碼進行標記,通過Java的Annotation
Time of Update: 2015-01-06
標籤:- (NSString *)getCIELABString:(UIColor *)originColor { // Method provided by the Colours class extension NSDictionary *cieDict = [selfgetCIE_LabArrayByColor:originColor ]; return [NSStringstringWithFormat:@"(%0.2f, %0.2
Time of Update: 2015-01-05
標籤:Android開發四大組件--Activity詳解 - Android開發教程Android開發的四大組件在開發中應用中是必不可少的,下面就來詳解下四大組件之一Activity,總結自網路。Activty的生命週期的也就是它所在進程的生命週期。 一個Activity的啟動順序: onCreate()——>onStart()——>onResume() 當另一個Activity啟動時: 第一個Activity onPause(
Time of Update: 2015-01-06
標籤:在真機測試的時候往往會突然出現這樣一個錯誤,code signing is required for product type ‘Application‘ in SDK ‘iOS 7.0‘ ,就是說程式碼簽署認證不對勁。 解決方案,1.選擇工程->Build Settings -> Code Signing -> Code Signing Identity -> Debug -> Any ios SDK 將選項改為:iPhone
Time of Update: 2015-01-05
標籤:前提:之前配置好的android開發環境;重裝系統;壓縮了android目錄 配置:安裝java環境 安裝; 建立JAVA_HOME變數;JAVAHOME添加到path變數 JAVA_HOME=C:\Program
Time of Update: 2015-01-05
標籤:1. 下載Eclipse IDE2. 下載Android SDK3. 配置ADT外掛程式 一.Eclipse的下載 到網站:http://www.eclipse.org/downloads/ 上,由於我們是用Java開發的所以步驟如下:找到“Eclipse IDE for java
Time of Update: 2015-01-06
標籤: 開發環境多次安裝、google、baidu之後,終於把helloworld跑起來了,看到了介面上方的“hello,world”,鬱悶了一個月的心情終於有點釋放了。
Time of Update: 2015-01-06
標籤:1、存照片 1 - (void)setPhoto:(UIImage *)image{ 2 UIImage *image = image; 3 4 5 //0.5代表的是壓縮率,1為不壓縮,映像品質最高,0為最高壓縮,映像品質最低 6 NSData *imageData = UIImageJPEGRepresentation(image, 0.5); 7 NSString *relativePath = @"UserPhoto.jpg"; 8
Time of Update: 2015-01-05
標籤:android4.0 字型 roboto使用 自訂字型 一、自訂字型1.android Typeface使用TTF字型檔設定字型我們可以在程式中放入ttf字型檔,在程式中使用Typeface設定字型。第一步,在assets目錄下建立fonts目錄,把ttf字型檔放到這。第二步,程式中調用:AssetManager
Time of Update: 2015-01-05
標籤:一般情況下,在android系統中擷取手機的方位資訊在api中有TYPE_ORIENTATION常量,可以像得到加速度感應器那樣得到方向感應器sm.getDefaultSensor(Sensor.TYPE_ORIENTATION);然而我們這樣做的話在最新版的SDK中就會看到這麼一句話:“TYPE_ORIENTATION This constant is deprecated. use SensorManager.getOrientation()
Time of Update: 2015-01-06
標籤:一:meta資訊(1)<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/> width - viewport的寬度 height - viewport的高度
Time of Update: 2015-01-06
標籤:資料存放區 儲存 cache android
Time of Update: 2015-01-06
標籤:android 標題列 今日頭條 學習Android應用開發已經有一段時間了,對涉及應用開發的主要基礎知識已經有了一定的瞭解,學習過程中寫的部落格被我整理成立了一個專欄《Android應用開發基礎》。但是基本上寫的代碼都是一些單一知識點的示範Demo,與一個完整的產品相差甚遠。要具備開發複雜的產品級應用的能力,在掌握了應用開發的基礎知識的前提下,最好的方法莫過於模仿別人開發的優秀應用。在模
Time of Update: 2015-01-05
標籤:VideoView實際上是android SDK中封裝好的一個用於播放視頻的組件,使用步驟如下: 1.在布局檔案中定義Video組件; 2.使用以下方法載入指定視頻: 1)setVideoPath(String path) 2)setVideoURI(Uri uri) 3.調用Video的start()、stop()、pause()方法來控制視頻播放。 例子如下: 布局檔案 <?xml version="1.0"