Skip to content

Commit

Permalink
商品管理增加新增商品按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
woaomo committed Sep 15, 2015
1 parent 2fc42fe commit 989c320
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions YHB_Prj/YHB_Prj/Images.xcassets/icon_add.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "icon_add.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions YHB_Prj/YHB_Prj/shangpinguanli/ShangpinguanliVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "SPGLCategoryCell.h"
#import "SPGLSearchVC.h"
#import "SPGLSearchVC.h"
#import "SPNewViewController.h"

@interface ShangpinguanliVC ()
{
Expand All @@ -28,6 +29,8 @@ @interface ShangpinguanliVC ()
@property (nonatomic, strong) SPGLCategoryIndexList *modeList;

@property(nonatomic,strong) void(^selectBlock)(SPGLCategoryMode *);

@property(nonatomic,strong) UIButton *addBtn;
@end

@implementation ShangpinguanliVC
Expand Down Expand Up @@ -61,6 +64,11 @@ - (void)viewDidLoad {
self.indexTableview.dataSource = self;
self.indexTableview.tag = 11;

_addBtn = [[UIButton alloc] initWithFrame:CGRectMake(kMainScreenWidth-65, kMainScreenHeight-64-65, 55, 55)];
[_addBtn setImage:[UIImage imageNamed:@"icon_add"] forState:UIControlStateNormal];
[_addBtn addTarget:self action:@selector(touchAdd) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_addBtn];

[self.scanButton addTarget:self action:@selector(pushScanView) forControlEvents:UIControlEventTouchUpInside];
[self.searchBt addTarget:self action:@selector(pushSearchVc) forControlEvents:UIControlEventTouchUpInside];
}
Expand All @@ -77,6 +85,13 @@ - (void)viewDidAppear:(BOOL)animated
}
}];
}
#pragma mark 进入新增商品
- (void)touchAdd
{
SPNewViewController *vc = [[SPNewViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}


#pragma mark 进入搜索页面
- (void)pushSearchVc
Expand Down

0 comments on commit 989c320

Please sign in to comment.