| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- //
- // OrderInfoRModelCell.m
- // RedAnt ERP Mobile
- //
- // Created by Ray on 14-7-12.
- // Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
- //
- #import "CommonEditorCellModel.h"
- #import "RAUtils.h"
- #import "BundleModelViewController.h"
- @implementation CommonEditorCellModel
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
- {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- // Initialization code
- }
- return self;
- }
- - (void)awakeFromNib
- {
- // Initialization code
-
- // [self addGestureRecognizer: [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(longTap:)]];
- }
- - (IBAction)onClickBundle:(UIButton *)sender {
-
- UIViewController* vc=[RAUtils getViewController :sender];
-
-
- BundleModelViewController * bundleVC =[ vc.storyboard instantiateViewControllerWithIdentifier:@"BundleModelViewController"];
-
- bundleVC.content_data = self.bundle_item;
-
- UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:bundleVC] ;
-
-
-
-
-
-
- navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
- [vc presentViewController:navi animated:YES completion:^{
-
- // navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-
- NSLog(@"bundle present.........");
-
- // self.btop = false;
- // <#code#>
- }];
-
- }
- /*
- -(void)longTap:(UILongPressGestureRecognizer *)longRecognizer
- {
- if (longRecognizer.state==UIGestureRecognizerStateBegan) {
- [self becomeFirstResponder];
- UIMenuController *menu=[UIMenuController sharedMenuController];
- UIMenuItem *copyItem = [[UIMenuItem alloc] initWithTitle:@"复制" action:@selector(copyItemClicked:)];
- UIMenuItem *resendItem = [[UIMenuItem alloc] initWithTitle:@"转发" action:@selector(resendItemClicked:)];
-
- [menu setMenuItems:[NSArray arrayWithObjects:copyItem,resendItem,nil]];
- [menu setTargetRect:self.bounds inView:self];
- [menu setMenuVisible:YES animated:YES];
- }
- }
- #pragma mark 处理action事件
- -(BOOL)canPerformAction:(SEL)action withSender:(id)sender{
- if(action ==@selector(copyItemClicked:)){
- return YES;
- }else if (action==@selector(resendItemClicked:)){
- return YES;
- }
- return [super canPerformAction:action withSender:sender];
- }
- #pragma mark 实现成为第一响应者方法
- -(BOOL)canBecomeFirstResponder{
- return YES;
- }
- #pragma mark method
- -(void)resendItemClicked:(id)sender{
- NSLog(@"转发");
- //通知代理
- }
- -(void)copyItemClicked:(id)sender{
- NSLog(@"复制");
- // 通知代理
- }*/
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated
- {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|