首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >推送ViewController

推送ViewController
EN

Stack Overflow用户
提问于 2013-09-14 22:44:34
回答 1查看 192关注 0票数 0

我已经在appDelegate方法中添加了UINavigationBar。请查看我的截图。下面就是我用过的UINavigationBar。在middel的页面历史按钮就在那里。

在这里,当我点击历史按钮时,它不能转到historyviwcontrooler。因为我不能推视图。你能告诉我怎么才能推到这里吗?当我单击历史记录时,它只调用了一个调用,在那里只调用了另一个类,只有我给出了UI。我是如何在这里学习的。请帮帮我

代码语言:javascript
复制
#import "UICallButton.h"
#import "LinphoneManager.h"

#import <CoreTelephony/CTCallCenter.h>

@implementation UICallButton

@synthesize addressField;


#pragma mark - Lifecycle Functions

- (void)initUICallButton {
    [self addTarget:self action:@selector(touchUp:) forControlEvents:UIControlEventTouchUpInside];
}

- (id)init {
    self = [super init];
    if (self) {
        [self initUICallButton];
    }
    return self;
}

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUICallButton];
    }
    return self;
}

- (id)initWithCoder:(NSCoder *)decoder {
    self = [super initWithCoder:decoder];
    if (self) {
        [self initUICallButton];
    }
    return self;
}   

- (void)dealloc {
    [addressField release];

    [super dealloc];
}


#pragma mark -

- (void)touchUp:(id) sender {


    NSString *address = [addressField text];
    NSString *displayName = nil;
    ABRecordRef contact = [[[LinphoneManager instance] fastAddressBook] getContact:address];
    if(contact) {
        displayName = [FastAddressBook getContactDisplayName:contact];
    }
    [[LinphoneManager instance] call:address displayName:displayName transfer:FALSE];

}

@end

EN

回答 1

Stack Overflow用户

发布于 2013-09-14 22:55:47

基本上,为了能够执行从一个UINavigationController到另一个UIViewController的推式转换,您必须拥有一个UINavigationController,而不仅仅是一个UINavigationBar

我不是在解释如何做到这一点,因为它是非常基础的,你应该学习和阅读一些书籍/教程,然后再开始一个真正的项目。

以下是一些帮助您的链接:

  1. A nice tutorial
  2. How to use navigation controllers (来自apple)
  3. Navigation Controller class reference
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18802907

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档