The request is a URL-like thing.
It's got a JSON file.
NSString *path =[nsstring stringwithformat:@ "http://apis.juhe.cn/cook/query?key=80996127f667eac43832103850b3b13a &menu=%@ ", Self.accstr];
path= [path stringbyaddingpercentescapesusingencoding:nsutf8stringencoding];
nsurl *url=[nsurl Urlwithstring:path];
NSData *data = [NSData Datawithcontentsofurl:url];
Nsdictionary *dic = [nsjsonserialization jsonobjectwithdata:data options:0 Error:nil];
Request address appears in Chinese
URL encoding is required
Tab Bar
Didselectitem Tabbar's Tag attribute note
Tab Bar Controller
You can add branches to build a Viewcontroller connection select View Controllers
You can add Navigationcontroller to each branch
Select the editer/embled in that you want to add
Storyboard in Connect jump
1present Jump Direct Select previous page press control to select modal/show from the button *
2push Jump directly Select the previous page control line start from the button * Select push/present modally
Pass parameters
Prepareforsegue Sgue refers to the line where the jump is connected.
If you use the segue jump to go into this method before each jump to pass parameters in this method is the argument
Pushviewcontroller *vc=segue.destinationviewcontroller
In this case, pass the parameter
Wiring can be set for each line identifier
Judgment in the code
if (segue.identifier isequaltostring:@ "Identifer") {}
If the button and the line jump do not need to write the event will jump two times more than one page
Enumeration
typedef Enum:nsuinteger {
Meishi,
Dianying,
Jiudian,
Ktv
Xiaochi,
Xiuxianyule,
Liren,
Jiehun
} Categortype;
0921 tarbar& Enumeration Lan Yi