Time of Update: 2015-10-16
標籤:1.<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">width可是寬度,initial-scale初始化縮放比例,maximum-scale允許使用者縮
Time of Update: 2015-10-16
標籤:1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950/** * 清理緩衝第二種方法 * * @param sender <#sender description#> */-
Time of Update: 2015-10-16
標籤:1、降低執行時間這部分包括:緩衝、資料存放區最佳化、演算法最佳化、JNI、邏輯最佳化、需求最佳化幾種最佳化方式。(1). 緩衝緩衝主要包括對象緩衝、IO緩衝、網路緩衝、DB緩衝,對象緩衝能減少記憶體的分配,IO緩衝減少磁碟的讀寫次數,網路緩衝減少網路傳輸,DB緩衝較少Database的訪問次數。在記憶體、檔案、資料庫、網路的讀寫速度中,記憶體都是最優的,且速度數量級差別,所以盡量將需要頻繁訪問或訪問一次消耗較大的資料存放區在緩衝中。 Android中常使用緩衝:a.
Time of Update: 2015-10-16
標籤://初始化textfield並設定位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, 30)]; //設定邊框樣式,只有設定了才會顯示邊框樣式 text.borderStyle = UITextBorderStyleRoundedRect; typedef enum
Time of Update: 2015-10-16
標籤:最近用到搜尋功能。總結一下搜尋,無疑可以使用UISearchBar控制項!那就先瞭解一下UISearchBar控制項吧!UISearchBar控制項就是要為你完成搜尋功能的一個專用控制項。它整合了很多你意想不到的功能和特點!首先,還是來普及一下UISearchBar控制項API相關的屬性和方法吧!UISearchBar屬性相關_searchBar = [[UISearchBar alloc] initWithFrame:CGRectZero];// 初始化,不解釋
Time of Update: 2015-10-16
標籤:進度條:<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <ProgressBar
Time of Update: 2015-10-16
標籤: 筆者今天使用c++ 11的 std::thread在安卓裝置上來建立線程式控制制網路非同步發送,發現線程啟動就馬上閃退,估計是安卓裝置上不支援c++11的線程庫,或者安卓系統版本過低,所以還是用回以前的pthread_create來建立線程,以下是三種建立線程的方法以及對應使用方法: std::thread方法:(支援windowsphone,windowsRT,ios,mac平台)std::thread m_thread = std:
Time of Update: 2015-10-16
標籤:package com.sxt.callback;public class Button { //預存一段按鈕點擊的響應代碼 private OnclickListener mOnClickListener; //給mOnClickListener複製的方法 public void setOnClickListener(OnclickListener l){ this.mOnClickListener=l; }
Time of Update: 2015-10-16
標籤:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <Button android:id="@+id/btnLogin"
Time of Update: 2015-10-15
標籤: 近日因為系統升級導致xcode6.系列版本出現bug,於是開始使用xcode7。在使用之餘突然想到collectionView在iOS9中發布了一個可以移動cell的新特性,就嘗試著將其實現,無奈api文檔介面無法查看,只有一些列的api放在那裡。於是上網尋找,發現國內沒有搜尋到此類文章,於是FQ繼續找,最終找到的竟然都是swift版本,於是將其轉換為oc版本以協助國內需要的朋友學習使用。下面是具體用法:1.建立collectionView並設定代理-
Time of Update: 2015-10-15
標籤:1.在程式中擷取string.xml中字串和數值<?xml version="1.0" encoding="utf-8"?><resources> <string name="hello">Hello World, MainActivity!</string> <string
Time of Update: 2015-10-15
標籤: 1 package com.way.util; 2 3 import android.content.Context; 4 import android.net.ConnectivityManager; 5 import android.net.NetworkInfo.State; 6 7 public class NetUtil { 8 public static final int NETWORN_NONE = 0; 9 public static
Time of Update: 2015-10-15
標籤:個人開發人員帳號相對來說有lanuch assitant比較好弄 (這個在provisioning portal的home tab中) 對多人開發人員帳號來說,則有一些限制由管理員發一封邀請郵件收到後點擊進入https://developer.apple.com/devcenter/ios/index.action, 就可以看到右上方的iOS Provisioning Portal, 點擊進入即可添加Certificatexcode需要安裝一個認證,它管理著公開金鑰和私密金鑰。
Time of Update: 2015-10-15
標籤: 1.NSString 轉換成NSData 對象NSData* xmlData = [@"testdata" dataUsingEncoding:NSUTF8StringEncoding]; 2.NSData 轉換成NSString對象NSData * data; NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];3.NSData
Time of Update: 2015-10-15
標籤:#import "ViewController.h"@interface ViewController ()<UINavigationControllerDelegate,UIImagePickerControllerDelegate>@property (nonatomic,strong)UIImageView *headImageView;@end@implementation ViewController- (void)viewDidLoad { [super
Time of Update: 2015-10-16
標籤:我的項目是cocos2d-x-3.7.1的項目,用命令列(cocos run -p android)打包的時候報錯:running: ‘"D:\develop\adt-bundle-windows-x86-20140321\apache-ant-1.9.3\bin\ant"clean debug -f D:\deveop\Test\proj.android\build.xml
Time of Update: 2015-10-16
標籤:shape用於設定形狀,可以在selector,layout等裡面使用,有6個子標籤。 大小(size)漸層(gradient)填充(solid)圓角(corners)描邊(stroke)間隔(padding) res/drawable/shape_self.xml<?xml version="1.0" encoding="utf-8"?><shape
Time of Update: 2015-10-16
標籤:一、用Environment1、API擷取sdcard的路徑 File path=Environment.getExternalStorageDirectory(); path=new File(path,"test.txt");2、用流寫入內容3、擷取WRITE_EXTERNAL_STORAGE許可權二、擷取shared_prefs目錄,寫xml1、擷取SharedPreferences SharedPreferences
Time of Update: 2015-10-16
標籤: 10.2.1使用HttpURLConnection1,首先需要擷取到 HttpURLConnection 的執行個體,一般只需 new 出一個 URL 對象,並傳入目標的網路地址,然後調用一下 openConnection()方法。2,我們可以設定一下 HTTP 要求所使用的方法。常用的方法主要有兩個, GET 和 POST。 GET 表示希望從伺服器那裡擷取資料,而 POST
Time of Update: 2015-10-16
標籤:ios 動畫IOS的 普通動畫可使用UIKit提供的動畫方式; 複雜動畫可使用Core Animation。1、