【发布时间】:2014-06-19 06:26:49
【问题描述】:
我有一个这样的 UIImageView:
UIImage *image = [UIImage imageNamed:@"test.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(0, 0, 30, 30);
imageView.layer.cornerRadius = 5.0;
imageView.layer.masksToBounds = YES;
imageView.layer.borderColor = [UIColor lightGrayColor].CGColor;
imageView.layer.borderWidth = 0.1;
[self.view addSubview:imageView];
几个问题/问题:
- 如何将此按钮设为可点击按钮?
我想链接到设置(在我的应用程序中),但我是否必须像许多应用程序使用的设置图标一样创建该图像轮,或者它是 iOS 7 中的标准图标? 这就是我说的图标:
为什么我的边框不显示?
【问题讨论】:
-
你可以在你的 imageview 上放置一个自定义类型的 UIButton
-
为什么不尝试添加一个 UIButton,然后在该按钮上添加背景图像?
标签: ios objective-c uiimageview uibutton