English 中文(简体)
UIAlertView 不含电文
原标题:UIAlertView not showing message text

我正在发表一份在海峡布局中精炼的《FunertView》,但在地貌模式中,电文没有出现。

它是一份标准的统一文件,有3个县。

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"one", @"two", nil];

I have tried moving the buttons down (according to the height of the message label) and resizing the alert according to the relocated buttons, but the message still doesn t appear, despite there being plenty of room for display.
Setting the UILabel background to some color for debugging shows that it just isn t displayed..

EDIT:

The UILabel is there - It s just not being displayed.
In the willPresentAlertView method, I can see the UILabel in the NSAlertView s subviews.

问题回答

这似乎与《国际律师联合会意见》的编外法有关。 绕过了迷惑人解的一段轨道后,我设法进行了这项工作:

UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Message" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"one", @"two", nil];

[alert show];

// for some reason we have alpha 0 for 3 or 4 buttons
[[[alert subviews] objectAtIndex:2] setAlpha:1];
// also, for 3 buttons the height goes to 10 -> proof of concept  fix 
[[[alert subviews] objectAtIndex:2] setFrame:CGRectMake(12, 45, 260, 24)];

[alert release];

这只是概念的证明。 真正的工作aro,如果 it弃小view子,只贴上高到小或甲pha=0的标签

值得注意的是:

[alert show];

您可直接使用uialertview,并设定目标。 然后通过所有权和电文以及纽特。 并且点击纽子方法。

页: 1

UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Title" message:@"The message."
delegate:self cancelButtonTitle:@"button 1" otherButtonTitles:@"button", nil];
                  [alert show];
                  [alert relaese];


//Then use this method

-(void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
// the user clicked one of the ok/cancel buttons
    if(buttonIndex==0)
     {
       NSLog(@"Ok");
     }
     else
     {
     NSLog(@"cancel");
     }
}




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签