Time of Update: 2015-01-15
iOS 使用storyboard 傳值prepareForSegue: sender:方法跳轉多個頁面 identifier的使用,ios開發storyboardstoryboard的使用有的時候很繁瑣....傳值方法比較單一..使用起來還是比較頭痛....不過你瞭解之根本就慢慢熟悉它的方式...本人只做筆記不做技術....這裡是push連接點擊這裡添加identifier設定的標示符,這就是區分調轉頁面的唯一標識,當你觸發對應事件的時候,-
Time of Update: 2015-01-13
[iOS UI進階,iosui進階A.系統提供的手勢辨識器 1 - (void) testTap { 2 // 建立手勢辨識器 3 UITapGestureRecognizer *tapRec = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRun:)]; 4 tapRec.numberOfTapsRequired = 3; // 觸發需要點擊的次數 5
Time of Update: 2015-01-14
ios
Time of Update: 2015-01-13
IOS開發-多線程編程技術(Thread、Cocoa
Time of Update: 2015-01-11
IOS 通訊錄的模糊查詢1、首先拿到通訊錄-(void)ReadAllPeoples{ [contactsremoveAllObjects]; ABAddressBookRef addressBook =ABAddressBookCreateWithOptions(nil,nil); dispatch_semaphore_t sema =dispatch_semaphore_create(0);
Time of Update: 2015-01-12
CocoaAsyncSocketDemo,cocoaasyncsocket工程圖: 代碼:viewController.h#import <UIKit/UIKit.h>//加入標頭檔#import "AsyncSocket.h"@interface ViewController : UIViewController<AsyncSocketDelegate>@end viewController.m- (void)viewDidLoad {
Time of Update: 2015-01-10
iOS開發- 日誌列印(常見)Q:如何列印當前的函數和行號?A:我們可以在列印時使用一些先行編譯宏作為列印參數,來列印當前的函數和行號。如:NSLog(@"%s:%d obj=%@", __func__, __LINE__, obj); NSLog(@"%s:%d obj=%@", __func__, __LINE__, self); //輸出樣式: //2015-01-06 17:13:17.852 justTest[15079:613] //
Time of Update: 2015-01-10
關於iOS
Time of Update: 2015-01-10
iOS UIWebView 無法確定web頁面的真實高度@interface IndEditorDetailViewController (){ UIWebView *_webView; UIProgressView *_progressView; NJKWebViewProgress *_progressProxy;}@end@implementation IndEditorDetailViewController- (void)viewDidLoad {
Time of Update: 2015-01-07
iOS刪除AutoLayout有時候,我們需要動態改變View中AutoLayout裡的某個值,比如移動x值,或者y值,改怎麼辦呢? 以下用到 ZLLayoutConstraint 是別名 NSLayoutConstrainttypedef NSLayoutConstraint ZLLayoutConstraint;---------------刪除所有約束 #pragma mark - remove view to superView autoLayout- (
Time of Update: 2015-01-07
利用旋轉實現時鐘(IOS)利用旋轉實現時鐘(IOS) - (void)viewDidLoad {[super viewDidLoad];self.secondHand.layer.anchorPoint = CGPointMake(.5, .9);self.minuteHand.layer.anchorPoint = CGPointMake(.5, .9);self.hourHand.layer.anchorPoint = CGPointMake(.5, .9);self.timer
Time of Update: 2015-01-07
ios開發-cocos2d-x適配iphone6好久沒弄cocos2d-x了。今天閑著蛋疼重新玩了下。簡單說下自己解決iphone5適配的問題,方法很笨,但是挺簡單的。 1.在ios目錄下的RootViewController.mm檔案中加入如下代碼 [cpp] // Override to allow orientations other than the default portrait orientation.// This method is
Time of Update: 2015-01-06
IOS開發-Object-C Block的實現方式,ios-object-c前言:我們可以把Block當作一個閉包函數,它可以訪問外部變數和局部變數,但預設是不可以修改外部變數。你可以使用它來做回調方法,比起使用代理(Delegate)會更加直觀。順帶一提,蘋果很多的介面(API)都使用了Block。 一、Block的基本定義Block的基本寫法(也是詳細寫法):returnType (^blockName)(params) = ^returnType(params) {
Time of Update: 2015-01-04
[ios]ios-Demo4脫衣服/刮獎app-專業,ios-demo4app-普通版本完成的鋸齒很嚴重 但是Ios系統中僅CGContextClearRect 並不存在cyclo等方法。 網上查了一些資料。 發現還是利用到了CG 中的Mask來實現: 這種效果可以自訂畫筆的粗細等相關設定,不會像普通模式中出現比較嚴重的鋸齒。具體分析如下: 1.擷取需要隱藏View的layer的CGImageRef用於後面配合掩碼
Time of Update: 2015-01-04
Swift Tour 隨筆總結 (1),swifttourlet Constant var Variablelet implicitInteger = 70let implicitDouble = 70.0let explicitDouble: Double = 70 The so-called type implications To include value in strings:let fruitSummary = "I have \(apples +
Time of Update: 2015-01-05
一些Iphone sqlite 的封裝類,iphonesqlite相信很多人用iphone的Sqlite不會直接用C的方法,要麼自己封裝一層Object c的存取方法,要麼用CoreData,下面我整理些目前所了結的一些Sqlite 封裝類。 1.CoreData ,不用多說了,官方文檔很多。 2.FMDB ,讓你更熟悉使用Object c 的方法使用sql進行sqlite的操作,檔案也比較小,很輕量,發現問題了,自己估計也能解決。
Time of Update: 2014-12-31
iOS開發- 以圖搜圖功能實現 (源碼+解析)以圖搜圖這個功能相當實用, 之前在實現這個功能的時候, 有一些筆記, 今天就整合成博文, 分享給大家。 這個demo主要實現的功能包括: 自訂拍照介面Image Recognition以圖搜圖資訊擷取(通過識別出的映像, 擷取對應資訊) 下面是一個簡單的示範, 如下: 那麼如何?這樣的功能呢?如果自己去完成Image Recognition, 顯然不現實。最早我研究的是GoogleAPI,
Time of Update: 2014-12-27
iOS UIPageControl簡單一實例iOS UIPageControl簡單範例關於自動 滾動代碼 有待補充執行個體中的圖片自行添加.h 檔案代碼 #import @interface ViewController : UIViewController{ UIScrollView *_scrollView; NSMutableArray *slideImages; UIPageControl *_page;}@end.m
Time of Update: 2014-12-25
IOS開發基礎知識--片段6,ios基礎知識--片段三十三:IOS多視圖跳轉方法第一種:跳轉:[self presentModalViewController:control animated:YES];返回:[self dismissModalViewControllerAnimated:YES];第二種:跳轉:[self.navigationController pushViewController:subTableViewController
Time of Update: 2014-12-25
iOS_關於封裝AutoLayout的架構ZLAutoLayout目前在iOS開發中,越來越多的不同尺寸的螢幕,讓螢幕適配成為開發要點。回顧之前的開發中,我們要麼是用xib,要麼用代碼編寫控制項,需要展開則設定View的autoresizingMask裡面的枚舉值來進行設定展開屬性。這些都是絕對布局。而AutoLayout的優勢在那呢?AutoLayout是相對布局,也可以絕對布局。什麼是相對又什麼是絕對呢?相對是指,可以有參照點(View)來進行對它參考點進行約束。絕對是指,只針對父View來