iso 中从UIView类跳转到UIViewController 类中

本文介绍了一个名为 HHOrederView 的自定义 UIView 子类的实现细节,该控件用于展示订单信息,包括订单号、状态、名称、单价等,并提供了查看收据的功能。此外,还涉及到了 OrderManagement 视图控制器的相关代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

//
//  HHOrederView.h
//  redmany_oa
//
//  Created by cwz on 15-11-16.
//  Copyright (c) 2015年 qq. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "OrderManagement.h"

@interface HHOrederView : UIView

@property (retain, nonatomic) IBOutlet UILabel *orderNO;
@property (retain, nonatomic) IBOutlet UILabel *orderState;
@property (retain, nonatomic) IBOutlet UILabel *orderName;
@property (retain, nonatomic) IBOutlet UILabel *unitPrice;
@property (retain, nonatomic) IBOutlet UILabel *quantity;
@property (retain, nonatomic) IBOutlet UILabel *totalAmount;
@property (retain, nonatomic) IBOutlet UIImageView *orderImage;
//@property (retain, nonatomic)FriendsViewController *friendsVC;
@property (retain, nonatomic)OrderManagement *delegate;

@end

//
//  HHOrederView.m
//  redmany_oa
//
//  Created by cwz on 15-11-16.
//  Copyright (c) 2015年 qq. All rights reserved.
//

#import "HHOrederView.h"
#import "OrderManagement.h"
#import "ReceiptOrder.h"


@class orderData;
@interface HHOrederView()

- (void)pushReceipt;
@end
@implementation HHOrederView



- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }

    return self;
}

- (IBAction)receiptOrder:(id)sender {

    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"HH" bundle:nil];
    OrderManagement *p = [storyBoard instantiateViewControllerWithIdentifier:@"OrderMge"];
    self.delegate = p;
    [self pushReceipt];
    
}

- (void)pushReceipt {
   
    [_delegate pushReceiptOrder];
}

@end



-----------------------------------------------------------------------------------------------------------------------
//
//  OrderManagement.h
//  redmany_oa
//
//  Created by cwz on 15-11-18.
//  Copyright (c) 2015年 qq. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface OrderManagement : UIViewController

@property (retain, nonatomic) IBOutlet UITextField *orderIDtext;

- (void)pushReceiptOrder;
@end


//
//  OrderManagement.m
//  redmany_oa
//
//  Created by cwz on 15-11-18.
//  Copyright (c) 2015年 qq. All rights reserved.
//

#import "OrderManagement.h"
#import "HHOrederView.h"
#import "SqliteOperator.h"
#import "HHOrderStatus.h"
#import "HHOrderCell.h"
#import "MJRefresh.h"
#import "ParentForm.h"
#import "MBProgressHUD.h"
#import "WJUserInfo.h"
#import "ReceiptOrder.h"



#define scrollX    0
#define scrollY    137
//#define scrollHigh 431
#define orderHigh  128

@interface OrderManagement ()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,DeleteMicroCommandFinishDelegate>
@property(nonatomic,strong)NSMutableArray *datas;
@property(nonatomic,weak)UITableView *orderTableView;
@property(nonatomic,copy)NSString*state1;
@property(nonatomic,copy)NSString*state2;
@property(nonatomic,copy)NSString*orderID;

@property (retain, nonatomic) IBOutlet UIButton *sureBnt;
@property (retain, nonatomic) IBOutlet UIButton *payBtn;
@property (retain, nonatomic) IBOutlet UIButton *unFinishBtn;
@property (retain, nonatomic) IBOutlet UIButton *finishBtn;

@end

@implementation OrderManagement

- (void)pushReceiptOrder {
   
    NSLog(@"---------");
    
    UIStoryboard *storyBoart = [UIStoryboard storyboardWithName:@"HH" bundle:nil];
    
    ReceiptOrder *receipt = [storyBoart instantiateViewControllerWithIdentifier:@"Receipt"];
    
    [self.navigationController pushViewController:receipt animated:YES]; // 麻烦帮忙看看为什么不能跳转到ReceiptOrder 这个控制器的界面中
   
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值