[Video tutorial] aggregating data IOS project development combat: Barcode Finder

Source: Internet
Author: User

Course Background:


Aggregated data is one of the largest basic data API providers in the country. Free to provide safe, stable and efficient data from weather inquiries, air quality, map coordinates to financial funds, e-commerce parity, illegal inquiries and other fields. Developers can use the aggregation data API for the rapid development of mobile apps, eliminating data collection, maintenance and so on, greatly reducing the development cycle and cost.


Core content:


1. Barcode Finder structure analysis.
2. How to add the aggregation data SDK to the project.
3. Encapsulation of models and business classes.
4. Data transfer between controllers.
5.tableView and the use of WebView.


Development Environment: Xcode 6, Mac OS X 10.10



Course Outline

1. Barcode Finder Interface Setup

12:53650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This class through the analysis of bar code query UI structure and business logic, quickly build up the Barcode Finder business interface.

2. Introduction to Aggregation Data SDK usage

13:15650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This lesson introduces the download of the Aggregation Data SDK, as well as the use of the SDK with the documentation and the Demo, to add the framework for the project and to obtain the OpenID and request parameters for the project by applying for aggregated data accounts. and analyze the return data of aggregated data by testing the code.

3. Perfect City Selection interface

21:22650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This lesson demonstrates how to add third-party frameworks and business classes and models packaged by geek College teachers to the project and quickly use them, and display the captured data in the city selection interface, and enable data transfer between the city selection interface and the home page.

4. Details of the product interface to complete the preliminary

24:41650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This class analyzes the product details interface data, demonstrates how to use the already packaged business classes and models to display e-commerce and supermarket data to the interface, and give the aggregate data to obtain data type uncertainty solution.

5. Product Details interface Complete data display

19:03650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This lesson demonstrates how to add a group header control and how to use Xib to quickly create a tableView Headerview, and pass the server data utilization model to a control within Xib, where ImageView's picture shows Sdwebimage.

6. Perfect Purchase Interface

13:43650) this.width=650; "src=" Http://s1.jikexueyuan.com/v3/static/images/common/ue-time-14-1.png "alt= "Play button" style= "Border:none;"/>

This lesson shows how to change the view of the controller in Uiviewcontroller to WebView and use WebView to display the purchase interface and use Mbprogresshud to give a UI hint when the e-commerce does not have a link to purchase.


Course prototype diagram

650) this.width=650; "Src=" http://img.blog.csdn.net/20141105144629084?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvu29yb3nx/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

650) this.width=650; "Src=" http://img.blog.csdn.net/20141105144647539?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvu29yb3nx/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>
650) this.width=650; "Src=" http://img.blog.csdn.net/20141105144707585?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvu29yb3nx/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>

650) this.width=650; "Src=" http://img.blog.csdn.net/20141105144742281?watermark/2/text/ ahr0cdovl2jsb2cuy3nkbi5uzxqvu29yb3nx/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity/ Southeast "style=" Border:none; "/>


Course Code Snippets

@interface Viewcontroller () <JKCitiesControllerDelegate>

@property (nonatomic, copy) NSString *cityid;
@property (Weak, nonatomic) Iboutlet Uitextfield *inputtextfield;

@end

@implementation Viewcontroller
-(ibaction) Chaxunonclick {

if (!self.inputtextfield.hastext) {
[Mbprogresshud showerror:@ "Please enter the product barcode!"];
Return
}

Jkgoodscontroller *GVC = [[Jkgoodscontroller alloc] init];
Barcodeparam *param = [[Barcodeparam alloc] init];
Param.cityid = Self.cityid;
#warning actually developed here is the text input fancy string
Param.barcode = @ "6923450601822";

Param.barcode = Self.inputTextField.text;

Gvc.barcodeparam = param;
[Self.navigationcontroller PUSHVIEWCONTROLLER:GVC Animated:yes];
}

-(void) Viewdidload {
[Super Viewdidload];
Additional setup after loading the view, typically from a nib.

[[Jhopenidsupplier Sharesupplier] Registerjuheapibyopenid:jhopenid];

Self.title = @ "Barcode Finder";

Self.navigationItem.rightBarButtonItem = [[Uibarbuttonitem alloc] initwithtitle:@ "Shanghai" style: Uibarbuttonitemstyledone target:self Action: @selector (OPENCITIESVC)];
Self.cityid = @ "1";


//
[Self test:kjhapis_ex_jhbar_city parameters:@{@ "pname": @ "Com.jikexueyuan.JKJHBarCode" @ "V": @ "2.0"}] ;
[Self Test:kjhapis_ex_jhbar_bar parameters:@{@ "barcode": @ "6923450601822", @ "Cityid": @ "1", @ "pname": @ "Co M.jikexueyuan.jkjhbarcode "@" V ": @" 2.0 "}];
[Self test:kjhapis_ex_jhbar_buy parameters:@{@ "barcode": @ "6923450601822", @ "Dsid": @ "5" @ "PName": @ "Com.jikexueyuan.JKJHBarCode" @ "V": @ "2.0"}];
}
-(void) Test: (NSString *) path parameters: (nsdictionary *) parameters{

Juheapi *juheapi = [Juheapi Sharejuheapi];
[Juheapi Executeworkwithapi:path
Parameters:parameters
success:^ (id responseobject) {
if ([[Parameters objectforkey:@ "Dtype"] isequaltostring:@ "xml"]) {
NSLog (@ "***xml*** \%@", responseobject);
}else{
int error_code = [[Responseobject objectforkey:@ "Error_code"] intvalue];
if (!error_code) {
NSLog (@ "%@", responseobject);
}else{
NSLog (@ "%@", responseobject);
}
}

} failure:^ (Nserror *error) {
NSLog (@ "error:%@", error.description);
}];
}
-(void) didreceivememorywarning {
[Super didreceivememorywarning];
Dispose of any resources the can be recreated.
}

-(void) opencitiesvc
{
Jkcitiescontroller *CVC = [[Jkcitiescontroller alloc] init];
Cvc.delegate = self;
[Self.navigationcontroller PUSHVIEWCONTROLLER:CVC Animated:yes];
}

#pragma mark-jkcitiescontrollerdelegate

-(void) Backtomainvcwithcity: (City *) City
{
1. Replace the title of the button in the upper right corner
Self.navigationItem.rightBarButtonItem.title = City.cityname;

2. Pass to the host controller a Cityid of data
Self.cityid = [NSString stringwithformat:@ "%@", City.cityid];

}


Course Address:http://www.jikexueyuan.com/course/324.html


[Video tutorial] aggregating data IOS project development combat: Barcode Finder

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.