目前分類:ios開發筆記 (78)
- Dec 09 Tue 2014 11:30
iOS_object-c將UIImage存到手機相簿
[library writeImageToSavedPhotosAlbum:[image CGImage]
orientation:(ALAssetOrientation)[image imageOrientation]
completionBlock:completionBlock];
- Dec 08 Mon 2014 23:54
iOS_object-c簡單的跳出視窗
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"結果" message:@"腳長" delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alert show];
- Dec 08 Mon 2014 23:15
IOS系統UIIMAGE儲存圖檔
設定路徑
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString* path = [documentsDirectory stringByAppendingPathComponent:
[NSString stringWithString: @"test.jpg"] ];
- Dec 04 Thu 2014 23:52
opencv iOS IplImage read jpg
NSString *path = [[NSBundle mainBundle] pathForResource:@"test2.jpg" ofType:nil];
IplImage *img = cvLoadImage([path UTF8String], 0);
- Dec 04 Thu 2014 23:49
opencv使用於iOS上IplImage to UIImage
-(UIImage *)UIImageFromIplImage:(IplImage *)inputImage
{
CGColorSpaceRef colorSpace;
if (inputImage->nChannels == 1) {
colorSpace = CGColorSpaceCreateDeviceGray();
}
else {
colorSpace = CGColorSpaceCreateDeviceRGB();
- Dec 04 Thu 2014 22:21
IOS8使用opencv心得
- Dec 04 Thu 2014 11:49
OpenCV IplImage轉Mat
Mat& mat;
IplImage* iplImage;
IplImage _img = mat;
iplImage = &_img;
- Dec 02 Tue 2014 10:52
UIButton按鈕更換圖片
[b1 setImage: [UIImage imageNamed:@"check_a.png"] forState:UIControlStateNormal];
- Dec 01 Mon 2014 12:00
lexical or preprocessor issue 'climits' file not found
問題:
IOS專案用到OBJECTC與C++混寫的地方引用標頭檔出現錯誤
lexical or preprocessor issue
'climits' file not found
原因:是要去設定C++還境
解決方式:
到專案設定Build Settings->Apple LLVM Compile->compile source as-> Objective-C++
IOS專案用到OBJECTC與C++混寫的地方引用標頭檔出現錯誤
lexical or preprocessor issue
'climits' file not found
原因:是要去設定C++還境
解決方式:
到專案設定Build Settings->Apple LLVM Compile->compile source as-> Objective-C++
- Oct 28 Tue 2014 00:10
xcode 6 ios Storyboard
很方便ipad和iphone只要一個Storyboard就好了
把Storyboard範圍選到綠色範圍最後把元件全部
add NEW cONSTRAINTS
就會全部固定比例非常的好用
下次再放教學,最近趕大案子。
- Oct 08 Wed 2014 23:53
為何開發完成的APP需要實體手機或平板測試?
一般APP開發者都是在電腦寫完程式,再透過電腦上的模擬機測試。當程式完成時在使用實體的手機或平板做為測試。為什麼有了虛擬機還需要實體的手機測試呢?
以WEB APP來說:每個手機、平板裝置的螢幕解析度大小不同、比例也不同。粗心的工程師可能會忽略掉不同螢幕的設定,造成了同一個APP在不同裝置顯示出來的結果不同甚至是整個頁面跑版的情況。為了避免這種情況發生需要在不同大小的螢幕上做測試,確保頁面可以正確地顯示於手機與平板中。
以原生APP來說:除了與WEB APP一樣有著版面的問題,更有同一個APP在不同裝置上執行跑出不同結果的情況。原因在於每一支手機的系統一樣由系統商提供,但底層韌體與系統參數預設都是由各家廠商自行處理。造成了一個APP在不同手機上執行跑出不同結果的情況。為了要讓APP能在市面上大部分裝置運行順暢需要各家廠牌的手機與平板做為測試。
以WEB APP來說:每個手機、平板裝置的螢幕解析度大小不同、比例也不同。粗心的工程師可能會忽略掉不同螢幕的設定,造成了同一個APP在不同裝置顯示出來的結果不同甚至是整個頁面跑版的情況。為了避免這種情況發生需要在不同大小的螢幕上做測試,確保頁面可以正確地顯示於手機與平板中。
以原生APP來說:除了與WEB APP一樣有著版面的問題,更有同一個APP在不同裝置上執行跑出不同結果的情況。原因在於每一支手機的系統一樣由系統商提供,但底層韌體與系統參數預設都是由各家廠商自行處理。造成了一個APP在不同手機上執行跑出不同結果的情況。為了要讓APP能在市面上大部分裝置運行順暢需要各家廠牌的手機與平板做為測試。
- Sep 28 Sun 2014 01:41
UIWebView載入網頁
NSString *urlAddress = @"http://~~~~~~~~";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
- Sep 25 Thu 2014 10:09
ios 以 UIWEBVIEW方式上架
最近測試IOS上架
一個用 多個UIWEBVIEW做的APP上架成功
一個用 多個UIWEBVIEW做的APP上架成功
- Sep 22 Mon 2014 14:52
ios 上架問題
----- 17.5 -----
We noticed that your app includes account registration or access to users’ existing accounts but does not include a privacy policy, which does not comply with the App Store Review Guidelines.
Please update your app metadata to include a privacy policy and ensure that the privacy policy URL you provide directs the user to the intended destination.
If your iTunes Connect Application State is Metadata Rejected, we do NOT require a new binary.
- Sep 18 Thu 2014 16:27
ios APP上架錯誤ITC.apps.validation.prerelease_build_missing
其實這不算錯誤...因為ITUNES CONNET改版後上架方式有調整...把APP上傳後還要去選擇建立的版本如下
點擊BUILD會跳出你上傳過的APP程式
選擇你上架用的APP後就可以提交了
- Sep 14 Sun 2014 21:16
ios上架失敗Launch 問題
今天使用XCODE上傳APP再上傳過程中出現以下錯誤訊息
Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a UIlaunch image referenced in the Info.plist under
UIlaunchimages with a UIlaunchimagesize value ser to {320,568}.
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/Iconography.html#//apple_ref/doc/uid/TP40006556-CH14-SW5
因為我沒有使用到初始畫面所以看到Launch感覺很奇怪,後來發現自己的Launch設定有動到.把Launch 圖片改成Default.png重新上傳就可以了.如有使用到初始畫面則要把所有裝置尺寸的Launch圖片給加入就可以上傳.
Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a UIlaunch image referenced in the Info.plist under
UIlaunchimages with a UIlaunchimagesize value ser to {320,568}.
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/Iconography.html#//apple_ref/doc/uid/TP40006556-CH14-SW5
因為我沒有使用到初始畫面所以看到Launch感覺很奇怪,後來發現自己的Launch設定有動到.把Launch 圖片改成Default.png重新上傳就可以了.如有使用到初始畫面則要把所有裝置尺寸的Launch圖片給加入就可以上傳.
- Sep 11 Thu 2014 11:57
判斷NSString是否為空
- Sep 11 Thu 2014 10:37
判斷是使用什麼裝置開啟IOS程式
再使用XCODE寫IOS APP時,若是不同裝置使用不同Storyboard我們要在跳轉夜宴時要考慮目前是使用何種裝置開啟.來決定要使用的Storyboard.否則就會出現那種無論界面怎樣改跑出來畫面都一樣的情形.寫個範例程式碼如下
1 |