Giter VIP home page Giter VIP logo

cxalertview's Introduction

Hi there ๐Ÿ‘‹

I'm a software engineer who has been building beautiful iOS apps since 2011. I am also passionate about helping other engineers and shaping a healthier engineering culture.

  • ๐Ÿง‘โ€๐Ÿ’ป I code in Swift by day, Python by night, and JS on weekend.
  • ๐Ÿ“š I like reading books. Here is my booklist.
  • ๐Ÿ“ Occasionally, I write my thoughts on Write The Func.
  • โญ๏ธ Fun fact: The only novel I have is The Hitchhiker's Guide to the Galaxy

ChrisXu's GitHub stats

cxalertview's People

Contributors

bitdeli-chef avatar bryant1410 avatar christophercarranza avatar chrisxu avatar czeluff avatar heikkihautala avatar jonathanramirez avatar ki1l3r avatar mlilback avatar ran-ii avatar scottphc avatar skx926 avatar yam-liu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cxalertview's Issues

LiveFrost dependency

hi,
it's a problem with the podspec of this library. It doesn't contain the LiveFrost dependency.

New version?

Hello,
Cloud you please release(tag) a new version and modify the cocoapods spec for it? The "newest" version released is 7 month ago!! We hope to enjoy this great tool via cocoapods and need a newer tag.
Thanks.

When string length is too long, view does not grow

I have a situation where I have an image set as the contentView and a string above it. when the string is too long, the image is hiding the text, instead of being below it, and having the container view grow.

CGContext 0x0 issue

hi ~

I found there has some warning when running on iOS6 and iOS7 ,

I think the problem is in the

LFGlassView.m Line No. 197

[self.blurSuperView.layer renderInContext:effectInContext];

I think it should be check it before use it.

thanks

main thread blocking

when i use it like this,
CXAlertView * alert=[[CXAlertView alloc] initWithTitle:@"warning" message:message cancelButtonTitle:@"cancel"];
[alert addButtonWithTitle:@"continue" type:CXAlertViewButtonTypeDefault handler:^(CXAlertView *alertView, CXAlertButtonItem *button) {
CXAlertView * secondeAlertView=[[CXAlertView alloc] initWithTitle:@"XX" message:@"xxxxxxxxxxxx" cancelButtonTitle:@"sure"];
[secondeAlertView show];
[alertView dismiss];
}];

when i click 'sure' button , the main thread is blocking. i can't touch my view any more!
can you fix the bug ?

orientation bug iOS 8

I think the problem involves using

[UIScreen mainScreen].bounds]

when trying to determine the background's position and size, it's causing issues.

IOS 7 deprecated warning

Hi,

First thanks for such class. I have a warning in xcode 5.1.1 saying :

CXAlertView.m:754:29: 'sizeWithFont:constrainedToSize:lineBreakMode:' is deprecated: first deprecated in iOS 7.0 - Use -boundingRectWithSize:options:attributes:context:

Regards

CXAlertViewController force showing status bar

Hello,

I'm showing CXAlertView inside a Controller that hides status bar.

when alert is shown, status bar appears. I think the problem is that CXAlertViewController is not declaring anything about the new iOS7 code for status bar.

How to force status bar to be as main controller has requested?

Many thanks,
Daniele

Issue getting only in iOS 9 above versions

I am entering some text in text field then after click on submit button (at that time key board is appeared).... after one alert view or custom alert will come.... But in ios 9 above versions popups(alert views, custom alerts) automatically disappeared

[CXAlertView dismiss] bug

Dear,
There is a bug after invoking [youCXAlertView dismiss], please see the detail below.

In the screenshot, you could see that there is still a CXAlertView on the top layer
receiving all touch events after invoking [youCXAlertView dismiss], which hangs up the app just like blocking the main-thread.

Revision:

My revision is 2014/03/28, downloaded from git repo directly.

Reproduce steps:

  1. press OK to login. The CXAlertView doesn't execute [cxAlertView dismiss] because giving by a wrong password.
  2. press Cancel.

Here is my code:

- (void)showLoginDialog:(NASServer *)targetNAS withResultBlock:(void(^)(BOOL success, NSError *e))loginResult{
    NSString *bundleName = @"ASViewController";
    ASViewController *loginViewController =[[[NSBundle mainBundle] loadNibNamed:bundleName
                                                                          owner:self
                                                                        options:nil] objectAtIndex:0];

    loginViewController.loginResultBlock = loginResult;
    loginViewController.targetNASServer = targetNAS;
    [CXAlertView showContentViewAlert:NSLocalizedString(@"PwdConfirm", nil)
                      withActionTitle:NSLocalizedString(@"OK", nil)
                      withContentView:loginViewController
                    withActionHandler:^(CXAlertView *alert, CXAlertButtonItem *btn){
                        QNVideoStationAPIManager *videoStation = [QNAPCommunicationManager share].videoStationManager;
                        [videoStation authLogin:loginViewController.usernameField.text
                                   withPassword:loginViewController.passwordField.text
                               withSuccessBlock:^(RKObjectRequestOperation *o, RKMappingResult *r){
                                   [alert dismiss];
                                   loginResult(YES, nil);
                               }
                               withFailureBlock:^(RKObjectRequestOperation *o, NSError *error){
                                   loginResult(NO, error);
                               }];
                    }];
}

+ (CXAlertView *)showContentViewAlert:(NSString *)title withActionTitle:(NSString *)actionTitle withContentView:(UIView *)contentView withActionHandler:(void(^)(CXAlertView *alert, CXAlertButtonItem *btn))cxHandler{
    CXAlertView *alert = [[CXAlertView alloc] initWithTitle:title
                                                contentView:contentView
                                          cancelButtonTitle:NSLocalizedString(@"Cancel", nil)];
    if (actionTitle != nil) {
        [alert addButtonWithTitle:actionTitle
                             type:CXAlertViewButtonTypeCustom
                          handler:^(CXAlertView *_alert, CXAlertButtonItem *btn){
                              cxHandler(_alert, btn);
                          }];
    }

    alert.cancelButtonFont = [UIFont systemFontOfSize:18.0f];
    alert.customButtonFont = [UIFont boldSystemFontOfSize:18.0f];
    alert.cancelButtonColor = [UIColor colorWithHexString:@"007aff" alpha:1.0f];
    alert.customButtonColor = [UIColor colorWithHexString:@"007aff" alpha:1.0f];

    [alert show];

    alert.showBlurBackground = NO;
    return alert;
}

2014-06-05 2 47 13

possible to show images?

Hello
Is it possible to show images? I see the demo you have shows the image on click.

Thanks

Frost background issue

Hello, I am showing this alert from a viewcontroller i pressented as modalview, but the frosted background is showing the root viewcontroller of the app, why?

thanks

Update release to 1.1.0

Pod is still referring to an older version, please update this so cocoa pods users can access the latest changes.

Background Scrim is Too Far Right

Hey All,
Today I moved to xcode6 and to a landscape ipad app. This is the 1st time I have opened the alert from a smaller child viewcontroller. My launching viewcontroller is a drop down menu. The menu brings up the alert, but the background scrim for the alert is about 200 pixels to the right.

Have any of you seen this?
Joe

alert another cxalertview in button handler will make self.view unaccessable after dismiss this two alertview.

Just replace following code in your demo with this, and you can see how this bug come out.

- (IBAction)showCXAlert:(id)sender
{
    CXAlertView *alertViewMe = [[CXAlertView alloc] initWithTitle:defaultMessageTitle message:@"Something about me...." cancelButtonTitle:nil];
    [alertViewMe addButtonWithTitle:@"click me first"
                               type:CXAlertViewButtonTypeDefault
                            handler:^(CXAlertView *alertView, CXAlertButtonItem *button) {
                                [alertView dismiss];
                                [[[CXAlertView alloc] initWithTitle:@"Alert"
                                                            message:@"Notice that this alert view's background is darker(double gray) than the first one, and no dark background on self.view"
                                                  cancelButtonTitle:@"Dismiss"] show];
                            }];

    [alertViewMe addButtonWithTitle:@"click me"
                               type:CXAlertViewButtonTypeDefault
                            handler:^(CXAlertView *alertView, CXAlertButtonItem *button) {
                                [[[CXAlertView alloc] initWithTitle:@"Alert"
                                                            message:@"After you dismiss this alert view, the self.view can not be accessable, only change background view's alpha to 1 but not removed?"
                                                  cancelButtonTitle:@"Dismiss"] show];
                                [alertView dismiss];
                            }];

    [alertViewMe show];
}

CXAlertBackgroundWindow.h

Im getting this error

CXAlertView/CXAlertBackgroundWindow.m:9:9: 'CXAlertBackgroundWindow.h' file not found

Crashing on sharedQueue

Bad access on sharedQueue shows as cause of crash. I was able to fix this by changing the sharedQueue method to alloc and init the NSMutableArray. The nextAlertView in CXAlertView.m also causes a problem when there's not a next alert view because it's not initialized at all, just declared as CXAlertView *nextAlertView, so this also throws a bad access error unless it's allocated. When I resolved both of those things, there is no more crashing and the alert is dismissed properly when I hit the cancel button.

Here's my change to the sharedQueue method:

pragma mark - CXAlertView PV

  • (NSMutableArray *)sharedQueue
    {
    if (!__cx_pending_alert_queue) {
    NSMutableArray *array = [[NSMutableArray alloc] init];
    __cx_pending_alert_queue = array;
    }
    return __cx_pending_alert_queue;
    }

option to hide button container

i am using this view to display a progress bar, i don't want any buttons to close it. you should have the option to disable buttons altogether in this.

im hacking it right now by setting button container height to 0

UIAlertView on ios7 seems to not bold the cancel button

Is there a reason why you are bolding the cancel button?. Example:
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil
message:@"Message"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Ok",nil];

Add access to alertview buttons

In my project I use -[UIView accessibilityLabel] for ui testing. But, unfortunately, I cannot set the label for alertView buttons.

I see two possible solutions:

  1. Add @property (nonatomic, readonly) NSArray *buttons to the class interface.
  2. Change return type of - (void)addButton... to - (void)addButton.... But default button options will be still unavailable.

What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.