iphone - Best way to split and convert url params into string values -
I would like to split a custom URL to open an app in the price in the iPhone, my plan would be:
apijem: // user = Johns mith and message = Blah% 20 blah
Where do I get "user" and "message" as two nssring Would like to Any advice on the best way?
Your URL is in the NS URL
object url < / Code> is called:
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc] init]; NSArray * Component = [[URL query] Separation from components: @ "& amp;"]; (Component in NSString * component) {NSArray * pair = [isolated from component components: 0 "="]; [Query parameter set object: [[Combination object atindexx: 1] StringBeerPlacingPark escaping encoding: NSMOROSRON staining encoding] KK: [pair objectwithoutx: 0]]; } ... [queryParams release];
Comments
Post a Comment