Welcome to pickSourcecode.com Login | Register    
pickZy.com
 Home  | search  | games  | General  | C  | C++  | Java  | Php  | Networking  | Visual Basic  | VC++  | Win32  | MFC  | JavaScript  | Jobs  | JavaScript  | Post jobs
Objective-C Tutorial: NSArray -- arrayWithContentsOfURL       Share
2009-09-05 |  RatheeshTR  | Viewed: 2534  |    2

//  I  am  using  strings,  but  you  can  add  just  about  any  object  to  an  NSArray
 

//  Creates  an  NSArray  with  one  object
NSArray  * myArray = [NSArray arrayWithObject:@"foo"];

 

//  Creates  an  NSArray  with  multiple  objects.  Don't  forget  to  add  nil  as  the  last  object
NSArray  * myArray2 = [NSArray arrayWithObjects:@"foo",@"bar",@"baz",nil];

//  Objective-C  Tutorial:  NSArray    

//  Creates  an  NSArray  from  another  NSArray
NSArray * myArray3 = [NSArray arrayWithArray:myArray2];

 

//  This  will  create  an  NSArray  from  data  on  iCodeBlog.    Go  ahead  and  try  it  out,  this  file  exists  on  our  servers  and  contains  valid  data.
NSArray * myArray4 = [NSArray arrayWithContentsOfURL:[NSURL URLWithString:@"http:
//icodeblog.com/wp-content/uploads/2009/08/foo.plist"]];

//  http://icodeblog.com/2009/08/26/objective-c-tutorial-nsarray/


Comments:





Submit comment's

Type:

User Comment's:

Submitted By:
Prof: Software Engineer
Tech: C ,Cpp
Send Mail: ratheesh



Related topics
UIView slide transition

Related References
iphone coding: slider tutorial

Web site contents © Copyright 2007, All rights reserved.
Help | Terms and Conditions | Privacy Policy | About Us