gpambrozio / BlockAlertsAnd-ActionSheets

Beautifully done UIAlertView and UIActionSheet replacements inspired by TweetBot
http://codecropper.com/2012/01/replicating-tweetbots-alerts-and-action-sheets/
MIT License
1.41k stars 268 forks source link

Not seeing the BlockAlertView on the iPad simulator #67

Open lpmacdevelopers opened 11 years ago

lpmacdevelopers commented 11 years ago

Hello,

I've been trying to resolve this issue with the BlockAlertView component, which doesn't display any text or render a background when invoked. All that is seen are two sets of three dots in the middle of the screen.

My investigations have revealed that in the "show" method, the background image is being set by using the format "alert--button.png" for the image file name, but the resultant image object has a nil value. I can confirm that the image resides in the file system and in the Resources sub folder. The Pods-resources.sh file also has this file with the correct path in the "install_resource" method call.

Any pointers in the right direction will surely be helpful.

Thanks Ashley

updatehostscreen_withinvisiblealert_cropped

TopherTimeMachine commented 11 years ago

Is this related to the UIBarPositioningDelegate in IOS7? I've had to update several apps because of this.

I had to make the view controller handle UIBarPositioningDelegate

And add something like the following..

lpmacdevelopers commented 11 years ago

I don't think so.

All I'm doing is this: BlockAlertView blockAlert = [BlockAlertView alertWithTitle:@"Wait" message:@"Please consider carefully, are you 100% sure you would like to update the host URL?"]; [blockAlert addButtonWithTitle:@"Ok" block:^{ NSString *urlRegEx =@"(http|https)://((\w)|([0-9])|([-|]))+([.|/](%28\w%29|%28[0-9]%29|%28[-|]%29))+"; NSPredicate urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", urlRegEx]; if ([urlTest evaluateWithObject:txt_hostUrl.text]) { [[[SharedVars sharedInstance] settings] setHostURL:txt_hostUrl.text]; lbl_hostUrl.text = [[[SharedVars sharedInstance] settings] hostURL]; [[SharedVars sharedInstance] saveMR_context]; [SVProgressHUD showWithStatus:@"Please wait...." maskType:SVProgressHUDMaskTypeBlack]; [ self performSelector:@selector(updateHostLabel) withObject:nil afterDelay:1]; // [self updateHostLabel]; } else{ [AJNotificationView showNoticeInView:self.view type:AJNotificationTypeGreen title:@"BAD URL" linedBackground:AJLinedBackgroundTypeAnimated hideAfter:2.5f]; } }]; [blockAlert setCancelButtonWithTitle:@"Cancel" block:^{}]; [blockAlert show];

msec commented 11 years ago

@lpmacdevelopers I'm experiencing this exact same issue at the moment and I'm not running iOS 7 in the simulator. Have you figured out how to resolve the problem?

msec commented 11 years ago

@lpmacdevelopers You gave me a good pointer when you started referring images having a nil value. I have just fixed the problem for myself, have you added both of the following folders to your own project as per the following folder paths?

Make sure that "Copy Items to destination folder (If needed) is checked" as well as "Create groups for any added folders".

The folder "To add to your projects" is deceiving as the images are also required.