好吧定義IBOutlet
,所以如果我是你,我會簡單地顯示該視圖上的錯誤消息未能加載,然後使用默認的取消操作來彈出此視圖(這是最常見的做法)
或者,如果您確實想在其他視圖中顯示消息,那種觀點顯示錯誤信息。有幾種方法可以做到這一點,但編號仍然與第一個選項。 (我可以告訴你如何,如果你真的想採取這種方法)
編輯:如果你只是想這個錯誤走開,在你的.m文件「實施」前加
@interface CatForm()
{
UIAlertView *cats;
}
@end
,改變
UIAlertView *cats = [[UIAlertView alloc] initWithTitle:@"**Read this first!**"
message:@"Thank you for considering to adopt a cat from our shelter. PLEASE READ THIS FORM CAREFULLY.\n\nThis on-line form is intended to assist you in selecting a cat that is suitable for you, your family, and your lifestyle.\n\nThe Friends of the Plymouth Pound have established guidelines and policies that must be met in order for your pre-screening application to be approved.\n\nThe information you provide is essential to facilitate the application review process.\n\nIn order to be considered for adoption by the Friends of the Plymouth Pound, you must:\n\n\n*Be at least 18 years old.\n\n*Provide all the applicable information requested below.\n\n**Note, any data field marked with an asterisk character (*) must be filled in. Incomplete application forms will not be considered for review and will be denied automatically.**\n\n*Understand that this is a pre-screening form.\n\n\nThe Friends of the Plymouth Pound will contact you and approve you if, and only if, all requirements have been met.\n\nUpon review of your pre-screening application, you will be contacted by the Friends of the Plymouth Pound to notify you if your application has been accepted and if further information is needed. \n\n\n**Please note that we do contact all personal references and veterinarians, and we must speak with them personally. In addition, in some cases, a pre-adoption home visit may also be required.**\n\nIn the event that your pre-screening application has been not been approved, we will notify you of same.\n\n\nTHE BOARD OF DIRECTORS OF THE FRIENDS OF THE PLYMOUTH POUND RESERVES THE RIGHT TO DENY ANY PRE-APPLICATION BASED ON THE ORGANIZATION'S ESTABLISHED STANDARDS AND POLICIES, INCLUDING, BUT NOT LIMITED TO, INCOMPLETE INFORMATION, NON-DISCLOSURE OR OMISSION OF PERTINENT FACTS, AND NON-COMPLIANCE WITH ACCEPTED STANDARDS.\n\n\nUpon approval of your application and transfer of the animal, you will be charged a $150.00 adoption fee per cat.\n\n\nWe are an all-volunteer organization. Due to the high volume of applications, we ask that you be patient in waiting for a reply. Please do not submit duplicate applications or separate requests for response. Doing this will not accelerate the review process in any way."
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
爲
cats = [[UIAlertView alloc] initWithTitle:@"**Read this first!**"
message:@"Thank you for considering to adopt a cat from our shelter. PLEASE READ THIS FORM CAREFULLY.\n\nThis on-line form is intended to assist you in selecting a cat that is suitable for you, your family, and your lifestyle.\n\nThe Friends of the Plymouth Pound have established guidelines and policies that must be met in order for your pre-screening application to be approved.\n\nThe information you provide is essential to facilitate the application review process.\n\nIn order to be considered for adoption by the Friends of the Plymouth Pound, you must:\n\n\n*Be at least 18 years old.\n\n*Provide all the applicable information requested below.\n\n**Note, any data field marked with an asterisk character (*) must be filled in. Incomplete application forms will not be considered for review and will be denied automatically.**\n\n*Understand that this is a pre-screening form.\n\n\nThe Friends of the Plymouth Pound will contact you and approve you if, and only if, all requirements have been met.\n\nUpon review of your pre-screening application, you will be contacted by the Friends of the Plymouth Pound to notify you if your application has been accepted and if further information is needed. \n\n\n**Please note that we do contact all personal references and veterinarians, and we must speak with them personally. In addition, in some cases, a pre-adoption home visit may also be required.**\n\nIn the event that your pre-screening application has been not been approved, we will notify you of same.\n\n\nTHE BOARD OF DIRECTORS OF THE FRIENDS OF THE PLYMOUTH POUND RESERVES THE RIGHT TO DENY ANY PRE-APPLICATION BASED ON THE ORGANIZATION'S ESTABLISHED STANDARDS AND POLICIES, INCLUDING, BUT NOT LIMITED TO, INCOMPLETE INFORMATION, NON-DISCLOSURE OR OMISSION OF PERTINENT FACTS, AND NON-COMPLIANCE WITH ACCEPTED STANDARDS.\n\n\nUpon approval of your application and transfer of the animal, you will be charged a $150.00 adoption fee per cat.\n\n\nWe are an all-volunteer organization. Due to the high volume of applications, we ask that you be patient in waiting for a reply. Please do not submit duplicate applications or separate requests for response. Doing this will not accelerate the review process in any way."
delegate:self cancelButtonTitle:@"OK"
otherButtonTitles:nil];
在查看有沒有加載
在堆棧溢出中使用代碼格式複製粘貼代碼,否則太麻煩,無法檢查我們。其實沒關係,在這種情況下,你的圖像質量足夠高。 – Pochi
好吧:Couln't不知道StackOverflow格式,但這裏是pastie.org鏈接:http://pastie.org/4117873 –
嘗試設置消息的代表有錯誤爲零。 – Pochi