<分区>
关闭 9 年前。
- 这个问题似乎是题外话,因为它缺乏足够的信息来诊断问题。更详细地描述您的问题或include a minimal example在问题本身。
- 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是偏离主题的,因为它们往往会吸引自以为是的答案和垃圾邮件。相反,describe the problem以及迄今为止为解决该问题所做的工作。
<分区>
关闭 9 年前。
如何在iOS中为导航栏后退按钮设置图片
谁能告诉我必须使用的图像的确切尺寸。
谢谢
最佳答案
UIImage* image3 = [UIImage imageNamed:@"back_button.png"];
CGRect frameimg = CGRectMake(15,5, 25,25);
UIButton *someButton = [[UIButton alloc] initWithFrame:frameimg];
[someButton setBackgroundImage:image3 forState:UIControlStateNormal];
[someButton addTarget:self action:@selector(Back_btn:)
forControlEvents:UIControlEventTouchUpInside];
[someButton setShowsTouchWhenHighlighted:YES];
UIBarButtonItem *mailbutton =[[UIBarButtonItem alloc] initWithCustomView:someButton];
self.navigationItem.leftBarButtonItem =mailbutton;
[someButton release];
关于ios - 将图像设置为 iOS 中的导航栏后退按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23931801/