Time of Update: 2014-11-30
標籤:style io ar color os sp for 檔案 on Objective-c 代理模式(delegate) 一、什麼事代理模式?
Time of Update: 2014-11-27
標籤:style blog http io ar color 使用 sp for 在上一篇博文中,我們有拿一個簡單的“汽車模型”來講解複合關係。在今天的這篇博文中,我
Time of Update: 2014-10-25
標籤:style blog color io os ar 使用 sp 檔案 檔案描述:.h 類的聲明檔案,使用者聲明變數、函數(方法).m
Time of Update: 2014-10-24
標籤:objective-c kvc ## Objective-C KVC 自動轉換類型研究apple很厚道,kvc的時候幫我們做了一些類型轉換,規律貼出來,給大夥參考參考@interface Entity : NSObject@property (nonatomic, copy) NSString *str;@property (nonatomic, assign) int i1;@property (nonatomic,
Time of Update: 2014-10-24
標籤:blog http io os ar 使用 for strong sp Objective-C中調用函數的方法是“訊息傳遞”,這個和普通的函數調用的區別是,你可以隨
Time of Update: 2014-09-24
標籤:des style color io 使用 ar strong for 檔案 點文法: 點文法的本質還是方法調用 當使用點文法時,
Time of Update: 2014-08-15
標籤:style blog color 使用 io strong 資料 for 1: 類Class: typedef
Time of Update: 2014-08-13
標籤:java io 檔案 2014 cti div 代碼 line
Time of Update: 2014-08-12
標籤:blog http java 使用 io 檔案 2014 ar 前言在Java中,我們可以通過"對象名.成員變數名"來訪問對象的公用成員變數,這個就稱為"點文法"。比如:1.在Student類的第2行定義了一個公用的成員變
Time of Update: 2014-08-11
標籤:java io 檔案 2014 cti div 代碼 line
Time of Update: 2014-08-06
標籤:style blog color io 2014 ar cti div 最近溫習《learn objective-c on the mac》第4章關於重寫的調用了[super setFillColor:c]很不理解其作用,
Time of Update: 2014-07-24
標籤:blog http java os 檔案 io 2014 art http://foredoomed.org/blog/2014/02/24/object-modeling-of-objective-c/Objective
Time of Update: 2014-07-16
標籤:class sel 發現很多初學者無法區分bool和BOOL及class類型,今天閑來無事,寫個博文做個區分1. bool是C語言的布爾類型,有true和false,BOOL是Objective C 語言的布爾類型,有YES和NO,因為OC可以跟C混編,所以bool和BOOL可以同時出現在代碼中2.
Time of Update: 2014-07-14
標籤:style color strong os art cti 1、複合通過包括作為執行個體變數的的對象指標實現的。 @interface Unicycle : NSObject
Time of Update: 2014-07-11
標籤:objective-c 模組化 擴充 interface xcode Objective-C中的Category(分類)1 Category概念:動態為已經存在的類添加新的行為(方法)2
Time of Update: 2018-12-07
從 XCode 4.2 開始 Objective-C 支援 ARC,對於廣大 iPone 開發人員來說是巨大的福音,不用面對滿屏 [obj release] 和 [pool drain] 這類醜陋不堪的代碼了,更重要的是不用整天為對象釋放問題搞得寢食難安。但對於許多從 C++ 轉到 ObjC 的開發人員來說,其實更喜歡 Obj-C++ 混編。Cocoa 負責介面展現,C++ 負責商務邏輯實現,組合起來十分完美。 問題是 Obj-C++ 能否完美支援 ARC 呢,特別是把 ObjcC
Time of Update: 2018-12-07
我們知道在Objective-C中,使用@property配合@synthesize可以讓編譯器自動實現getter/setter方法,使用的時候也很方便,可以直接使用對象.屬性的方法調用。NSString* name;NSUInteger age;@property(nonatomic,copy)NSString* name;@property(assign)NSUInteger age;@synthesize name;
Time of Update: 2018-12-07
我想在XCode上調用C++的代碼,我這這裡小結一下我的方法,Hello類只是為Objective-C調用C++做的一個封裝。但是我感覺這樣太不方便了,如果C++的代碼很多的時候,這樣做就很不好,期待有人給出好的解決方案,文章最後有這個Demo的原始碼。參考文章:http://blog.csdn.net/zhouhuiah/article/details/6426158寫講解一下這個Demo的內容1,建立一個項目,我選的是“Single View
Time of Update: 2018-12-07
// 初始化鎖對象ticketCondition = [[NSCondition alloc] init];//開始第一個線程。ticketsThreadone = [[NSThread alloc] initWithTarget:self selector:@selector(run) object:nil];[ticketsThreadone setName:@"Thread-1"];[ticketsThreadone start];//開始第二個線程。ticketsThreadtwo =
Time of Update: 2018-12-07
對於我們.net開發人員來說,.net為我們提供了自動記憶體管理的機制,我們不需去關心記憶體的管理。但是iphone開發中卻是不能的。這篇文章將簡述一下objective-c的記憶體管理機制和方法和一些特性。 手動的進行記憶體管理