Objective c 动态生成的ui栏按钮需要使用segue推送到popover
Z这是基于我在这里提出的一个问题,我已经取得了很好的进展: 我基本上遵循了为我提供的教程 问题: 现在我的问题是,我必须动态地生成我的ui栏按钮,就好像我只是将它拖放到情节提要上一样。我被限制在左侧和右侧各一个。这是我生成按钮的代码Objective c 动态生成的ui栏按钮需要使用segue推送到popover,objective-c,uipopovercontroller,uibarbuttonitem,uistoryboardsegue,uipopover,Objective C,Uipopovercontroller,Uibarbuttonitem,Uistoryboardsegue,Uipopover,Z这是基于我在这里提出的一个问题,我已经取得了很好的进展: 我基本上遵循了为我提供的教程 问题: 现在我的问题是,我必须动态地生成我的ui栏按钮,就好像我只是将它拖放到情节提要上一样。我被限制在左侧和右侧各一个。这是我生成按钮的代码 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UIBarButtonItem *btn = [[U
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"Button" style:UIBarButtonItemStyleBordered target:self action:@selector(getMenu:)];
self.navigationItem.leftBarButtonItems = [[NSArray alloc] initWithObjects:btn, nil];
}
基于该教程,我需要使用一个segue来弹出我需要的uitableview。但这需要我有一个这样的定位点
所以我的问题是,我该如何为这个uibarbuttonite添加一个锚定点?我一直在搜索,一直在寻找关于创建自定义popover类的内容?这是否准确?我通过在导航栏上创建一个不可见的UIView来解决这个问题,然后将其用作segue的定位点。问题是,当uiviewcontroller显示时,弹出窗口的箭头被笨拙地放置。我还在想办法 这就是我得到答案的地方