User Tools

Site Tools

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/qs_data.ser failed

Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







objective-c:foundation.framework:nsarray.h:initwithobjects

initWithObjects

 
- (id)initWithObjects:(id)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
 

Parameters firstObj, secondObj… Comma-separated objects ending with nil.

Return Value
An array initialized to include the parameters objects.

After an immutable array has been initialized in this way, it can’t be modified.

ObjC Sourcecode Example

    // ** Init some objects **
    NSNumber *number = [NSNumber numberWithInt:1];
    NSString *string = @"2. Object";
 
    // ** Init array **
    NSArray *myArray = [[NSArray alloc]initWithObjects:number, string, @"3. Object", nil];
 
    // ** Output array **
    NSLog(@"myArray: %@", myArray);

Output for this example code

2012-12-02 21:42:27.469 NSArraySample[1583:11303] myArray: (
    1,
    "2. Object",
    "3. Object"
)
advertising
objective-c/foundation.framework/nsarray.h/initwithobjects.txt · Last modified: 2014/05/30 21:52 by Mo

Impressum Datenschutz

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/misc_data.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ip.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/pages.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ua.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/page_users.ser failed