Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone-自定义V形图标_Iphone_Cocoa Touch - Fatal编程技术网

iPhone-自定义V形图标

iPhone-自定义V形图标,iphone,cocoa-touch,Iphone,Cocoa Touch,是否可以将UITableViewCellAccessoryDetailDisclosureButton的图标换成自定义图标?当然可以。将附件视图设置为自定义图像视图。确定。将附件视图设置为自定义图像视图。在视图中使用此选项进行说明: UIButton *advertButton = [UIButton buttonWithType:UIButtonTypeCustom]; advertButton.frame = CGRectMake(0, 0, 23, 23); advertButton.co

是否可以将
UITableViewCellAccessoryDetailDisclosureButton的图标换成自定义图标?

当然可以。将附件视图设置为自定义图像视图。

确定。将
附件视图设置为自定义图像视图。

在视图中使用此选项进行说明:

UIButton *advertButton = [UIButton buttonWithType:UIButtonTypeCustom];
advertButton.frame = CGRectMake(0, 0, 23, 23);
advertButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
advertButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;

[advertButton setImage:[UIImage imageNamed:@"button-image.png"] forState:UIControlStateNormal];
[advertButton addTarget:self action:@selector(advertFunction:) forControlEvents:UIControlEventTouchUpInside];

annView.rightCalloutAccessoryView = advertButton;

不要忘记在应用程序中包含图像以及选择器分配的功能。

在视图中使用此选项进行说明:

UIButton *advertButton = [UIButton buttonWithType:UIButtonTypeCustom];
advertButton.frame = CGRectMake(0, 0, 23, 23);
advertButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
advertButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;

[advertButton setImage:[UIImage imageNamed:@"button-image.png"] forState:UIControlStateNormal];
[advertButton addTarget:self action:@selector(advertFunction:) forControlEvents:UIControlEventTouchUpInside];

annView.rightCalloutAccessoryView = advertButton;
别忘了在你的应用程序中包括图像和选择器分配的功能