Arithmetic functions
Arithmetic functions]
Function Name
Description
Int rand ()
Random Number Generation.(Example)Srand (Time (NiL); // initial Random NumberInt val = rand () % 50; // 0 ~ Random Number
1. Convert string to date
Nsdateformatter * dateformat = [[nsdateformatter alloc] init]; // instantiate an nsdateformatter object[Dateformat setdateformat: @ "yyyy-mm-dd hh: mm: SS"]; // you can set the time format as needed.Nsdate * Date =
From: http://blog.csdn.net/pjk1129/article/details/6458644
This article introduces the new properties of objective-C language, where category allows you to add your own methods to existing classes, the Protocol is a special Inheritance Method in
Description Method of objective-C:All objects in Java have the string tostring () method inherited from the object, which is used to obtain the string representation of the object,The method signature for this method in objective-C is:
-(Nsstring *)
In objective-C, there are some data types that we are not familiar with but often see, such as ID, nil, nil, Sel, and so on. In many
Article We have seen the introduction of these data types, but they are not clear.
This article starts with the
Http://www.61ic.com/Mobile/iPhone/201108/36504.html
--------------------------------------------------
Objective-C development-codeblocks instance operationsAuthor: blog ParkArticleSource: blog page views: 139 updated on:
In objective-C
There are two methods to create an object in OC:
[Class Name New]
[[Class name alloc] int]
Allocation and initialization are two separate operations: To do nsobject class method alloc allocates a memory area for the object and clears it. The
Today, we can see Enum and typedef. Two examples are shown in the two sections:
Enum direction {north, south, east, west }; Typedef Enum {north, south, east, west} direction;
I can't help wondering what are the differences between the two. I
The following methods are available for comparison between dates:
-(Bool) is1_todate :( nsdate *) otherdate;
Yes is returned for comparison with otherdate.
-(Nsdate *) earlierdate :( nsdate *) anotherdate;
Returns the date earlier than
1 objective-C: variable and indirect.
Variables are indirect. By assigning a value to a variable, you only need to modify the value of the variable, instead of changing the appearance of the variable one by one.
Files are indirect. Mainly
Category allows you to extend the functions of a class even without the class source code and add methods to it.
** This can be understood as a mechanism of "Mixin.
The main function is to reuse the same method in a class without inheritance.
Gnustep
First, there is no objective-c ide in windows. objectiveeclipse is an optional plug-in that works with eclipse3.5 + cdt6.0, but the update has stopped. Gnustep is an API and tool similar to cocoa (Apple OS Development Framework). It
The Protocol application calls each other between two controllers or between the Controller and the custom uiview.
Its Applications are similar to interfaces in Java or C. Assume that a calls B and B calls back a, so we can design it as
Protocols in objective-C are similar to common interfaces and are implemented in classes as defined in protocols.@ Protocol myfirstprotocol-(Void) myfirstprotocolmethod;@ EndIn iPhone OS, protocols are usually used to implement the delegate object ).
I have seen a very good article that allows you to instantly understand what delegation is.
When we talk about the protocol, the declarative protocol is a reserved method body. The specific implementation of the method is waiting for the person who
Http://www.cnblogs.com/zhwl/archive/2012/01/05/2312649.html
Note the following differences between objective-C and Java:
A. Java uses class to identify classes, while objective-C uses @ interface/@ implementation to identify classes;
B. Java uses
In my spare time, I am interested in iPhone development. I want to learn how to use Objective C without Mac, so I have to go through windows.
1. Environment
Http://www.gnustep.org/experience/Windows.html download here: gnustep msys system, gnustep
Use of Public, protected, and private in objective-C
Similar to C ++, the use of public, protected, and private exists in objective-C, but the forms are different. Here is a brief summary.1. @ public, @ protected, @ privateI personally
Install gnustep
Gnustep Windows Installer provides a simulated development environment for objective-C on the Windows platform. There are four software packages, including gnustep system and gnustep core, gnustep devel and Cairo backend are optional.
Copyright Notice
This article is copyrighted by Vince yuan (Vince. Yuan # gmail.com. For non-profit reprinting, the original link http://vinceyuan.cnblogs.com/must be included, and the content of this copyright should be included.
Version 1.1 was
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.