Trên iPad ios 7 UIActionSheet mới không hiển thị chính xác với nhiều nút.Xcode iPad UIActionSheet với nhiều nút không hiển thị chính xác iOS7
Không làm sạch nền của UIActionSheet khi cuộn. Các nút có vẻ bị đóng băng trong nền UIActionSheet.
Mã của tôi:
UIActionSheet *popupQuery = [[UIActionSheet alloc];
for (int i=0; i<[ParamAllList count]; i++)
{
NSMutableDictionary *Param = [ParamAllList objectAtIndex:i];
[popupQuery addButtonWithTitle:[Param valueForKey:@"name"]];
[[[popupQuery valueForKey:@"_buttons"] objectAtIndex:[[popupQuery valueForKey:@"_buttons"] count]-1] setImage:[UIImage imageNamed:@"add40icon.png"] forState:UIControlStateNormal];
}
popupQuery.actionSheetStyle = UIActionSheetStyleAutomatic;
[popupQuery showFromRect:Button_Settings.frame inView:Button_Settings.superview animated:YES];
xin thêm mã khi bạn tạo bạn UIActionSheet –
UIActionSheet * popupQuery = [[UIActionSheet alloc]; cho (int i = 0; i <[số ParamAllList]; i ++) { NSMutableDictionary * Param = [đối tượng ParamAllListAtIndex: i]; [popupQuery addButtonWithTitle: [Param valueForKey: @ "name"]]; [[[popupQuery valueForKey: @ "_ buttons"] objectAtIndex: [[popupQuery valueForKey: @ "_ buttons"] count] -1] setImage: [UIImage imageNamed: @ "add40icon.png"] forState: UIControlStateNormal]; } popupQuery.actionSheetStyle = UIActionSheetStyleAutomatic; [popupQuery showFromRect: Button_Settings.frame inView: Button_Settings.superview hoạt ảnh: YES]; – Constantinus
Tôi về cơ bản đang làm điều tương tự với hình ảnh: ngay cả khi tôi làm điều này: UIActionSheet * popupQuery = [[UIActionSheet alloc] initWithTitle: @ "test" delegate: self cancelButtonTitle: @ "" destructiveButtonTitle: @ "Cancel" otherButtonTitles : @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi" , @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", @ "hi" , @ "hi", @ "hi", @ "hi", @ "hi", @ "hi", nil]; Nó messes lên như thế này .... Một cái gì đó để làm với số lượng các nút. – dan