Objective-C Primer(3)Multiple arguments for one method, synthesize and dynamic
Objective-C Primer(3)Multiple arguments for one method, synthesize and dynamic
- Author: 柳大·Poechant(鍾超)
- Email: zhongchao.ustc#gmail.com (# -> @)
- Blog:Blog.CSDN.net/Poechant
- Date: May 7th, 2012
1 How to declare a method with multiple arguments?
//
// TestClass.m
// ObjectiveCTest
//
// Created by 超 鍾 on 12-5-6.
// Copyright (c) 2012年 http://blog.csdn.net/poechant. All rights reserved.
//
#import "TestClass.h"
@implementation TestClass
-(void)privateMethod2: (int)inArg1 arg2:(int)inArg2
{
NSLog(@"private method 2");
}
-(void)someMethod;
{
NSLog(@"some method got called");
[self privateMethod1:1
arg2:2
arg3:3];
[self privateMethod2:1
arg2:2];
}
@end
2 How to invoke a method with multiple arguments?
It’s similar to declare the method. Do you remember…
-(void)privateMethod1: (int)inArg1
arg2: (int)inArg2
arg3: (int)inArg3
{
NSLog(@"private method 1");
}
3 What the difference between synthesize and dynamic?
synthesize
seems better thandynamic
because at this moment, you may think less is better. But your demands are not satisfied every time because of $.
-
轉載請註明來自柳大的CSDN部落格:Blog.CSDN.net/Poechant
-
相關文章
- @synthesize @dynamic 的區別
- Objective-C中的@property和@synthesize用法Object
- ssis multiple table to one file
- Objective-C中的@dynamicObject
- Objective-C Primer(1)Get started!Object
- Objective-C Primer(2)Private Methods and Class PropertiesObject
- Objective-C Method Swizzling 的最佳實踐Object
- 引入第三方庫報錯Could not find method apt() for argumentsAPT
- Objective-C執行時特性:Method Swizzling魔法Object
- Objective-C Runtime (三):Method Swizzling(方法替換)Object
- This is English 3 Unit one
- Objective-C Runtime 執行時之四:Method SwizzlingObject
- sim3d multiple component example3D
- InsideJVM(3)--Method area(方法區) (轉)IDEJVM
- Simple one-hot state transition 3
- Multiple Regression
- Android之Retrofit報錯Form-encoded method must contain at least one @Field.AndroidORMAIAST
- Function.caller, arguments.caller, arguments.callee, arguments.callee.calllerFunction
- Swift3、4中的@objc、@objcMembers和dynamicSwiftOBJ
- Swift3中的 Method SwizzlingSwift
- 函式式JavaScript(3):.apply()、.call() 和arguments物件函式JavaScriptAPP物件
- ORA-00600: internal error code, arguments: [qkaffsindex3], [], [], [], [], [], [], []ErrorIndex
- 案例ORA-00600: internal error code, arguments: [qkaffsindex3], [], [], [], []ErrorIndex
- OpenRTMFP/Cumulus Primer(7)CumulusServer啟動流程分析(續3)Server
- OpenRTMFP/Cumulus Primer(7)CumulusServer 啟動流程分析(續3)Server
- 我的隨行筆記3 C++ Primer Plus 3--指標筆記C++指標
- JS的argumentsJS
- JavaScript arguments 物件JavaScript物件
- JavaScript之argumentsJavaScript
- JavaScript中argumentsJavaScript
- JavaScript select multipleJavaScript
- Small Multiple(最短路)
- DataGridView with multiple tableView
- Multiple Buffer Pools (83)
- Multiple Block Sizes (53)BloC
- tomcat one connection one thread one request one threadTomcatthread
- Numerical Results of RhDYas CG method and RhLHas CG method
- TRLO: An Efficient LiDAR Odometry with 3D Dynamic Object Tracking and Removal3DObjectREM