내 앱에는 내가 선택할 가치가 많기 때문에 UIActionSheet
을 사용했습니다.UIActionSheet iOS의 선택된 배경색
다음 그림이 표시됩니다. 보시다시피
은 선택한 행 Color
는 Blue
입니다.
해당 색상을 Gray
으로 변경하고 싶습니다.
어떻게 변경할 수 있습니까?
내 앱에는 내가 선택할 가치가 많기 때문에 UIActionSheet
을 사용했습니다.UIActionSheet iOS의 선택된 배경색
다음 그림이 표시됩니다. 보시다시피
은 선택한 행 Color
는 Blue
입니다.
해당 색상을 Gray
으로 변경하고 싶습니다.
어떻게 변경할 수 있습니까?
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
//Gets an array af all of the subviews of our actionSheet
NSArray *subviews = [actionSheet subviews];
for (UIView *v in subviews)
{
if ([v isKindOfClass:[UIButton class]])
{
UIButton *b = (UIButton*)v;
[b setBackgroundImageByColor:[UIColor gray] forState:UIControlStateHighlighted ];
}
}
}
코드 시도 .. 선택시 배경 버튼에 청색 화상이나 층을 추가
setBackgroundImageByColor 오류 보여주는 형. –
어떤 오류가 로그에 표시됩니까 .... – Jitendra
setBackgroundImageByColor 메소드가 없습니다. 그 오류 표시 –
시도 .. – Bala
http://stackoverflow.com/q/4049103/1059705 – Bala