GithubHelp home page GithubHelp logo

lmalertview's People

Contributors

bitdeli-chef avatar enthouan avatar htggit avatar lmcd avatar marotan3 avatar zachboyd 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lmalertview's Issues

One analysis warning in the brand new DP2 Xcode on uninitialized data

CGRect frame;
frame.size = size;
// frame.origin is unitialized. Yeah, its just a spurious warning but thought I'd post it anyway!
_representationView = [[UIView alloc] initWithFrame:frame];

This fixes it (syntax is yours, I just saw it for the first time today! Nice! :-)
frame = (CGRect){.size = size};

Modaltransformanimation completionblock selector not recognized

Hi!

Just installed this via cocoapods (pointed to this github for latest release). I get an error in LMAlertView.m on row 473 saying that: -[RBBSpringAnimation setCompletion:]: unrecognized selector sent to instance XXXX.

By removing that block, the alertview does show up and seems to work. But obviously the didPresentAlertView in the delegate is not called upon the animation completion. It might just be some reference problem locally, but as it seems to find the CAAnimationBlocks library and not the setter, something is obviously not ok :)
The headers are there since i don't get any compilation errors.

Regards
Alex

Not Scrollable

The standard UIAlertView is scrollable when the text is longer than the screen. Would be nice to have that feature when displaying long text blocks.

setup() unused

You can remove this:

  • (void)setup
    {
    [self setupWithSize:CGSizeMake(270.0, 152.0)];
    }

Pod install failed

After I installed the pod, build failed with:

ld: warning: directory not found for option '-L/Users/robinqu/Desktop/catworks/CatWorks/Pods/build/Debug-iphoneos'
ld: framework not found GPUImage
clang: error: linker command failed with exit code 1 (use -v to see invocation)

GPUImage files do exist in the Pod folders.

Any clue to fix this?

Primary project is missing LMModalItemTableViewCell

I imported and tried to build just the folder LMAlertView. But it wouldn't build as you require the use of the LMModalItemTableViewCell class, located in the Demo folder. It would be a help to others if you moved that class into the core LMAlertView folder.

Cannot create an instance of LMAlertView in Swift

When the following code runs ...

var lmAlertView: LMAlertView = LMAlertView(title: "Titre", message: "Message", delegate: self, cancelButtonTitle: "Annuler")

... it crashes the App with the following error message ...

[LMAlertView initWithTitle:message:delegate:cancelButtonTitle:]: unrecognized selector sent to instance 0x7f85e0472b10

Even worse, when I try to add additional buttons but using the otherButtonTitles arguments like this ...

var lmAlertView: LMAlertView = LMAlertView(title: "Titre", message: "Message", delegate: self, cancelButtonTitle: "Cancel", otherButtonTitles: "OK")

... then the App will not even compile. I get the following error message:

Extra argument 'message' in call

In that case, I think that it's because it didn't find the signature of function that contains otherButtonTitles, it is trying to default to the one where you pass a view controller to LMAlertView() ... with 1 single argument.

Has anyone had this kind of problem? Can someone direct me to an example that shows how to use LMAlertView with Swift please?

Thanks everyone.

El Mouhandiss

Not transparent

I dont know what might be the reason but its not transparent for me
image

AlertView Position does not return when keyboard hides..

I fixed this on my side .. If anyone experieced it this is what i added in LMAlertView.m

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];

  • (void)keyboardWillHide:(NSNotification *)notification
    {
    self.representationView.layer.anchorPoint = CGPointMake(0.5, 0.5);
    self.representationView.center = CGPointMake([[UIScreen mainScreen] bounds].size.width / 2.0, ([[UIScreen mainScreen] bounds].size.height) / 2.0);
    }

Alert View's Title Not Centered

When setting a content view with width bigger than the default, the alert's title & message labels are not centered. Is there a workaround for this?

Carthage

Hello , you could put this framework in Carthage ?

Thanks.

message sent to deallocated instance error

Hi,

I'm calling segue on click of the other button, and this throws "message sent to deallocated instance" error on line #532 in LMAlertView.m file. The line is shown below.
if ([self.delegate respondsToSelector:@selector(alertView:didDismissWithButtonIndex:)]) {
[self.delegate alertView:(UIAlertView *)self didDismissWithButtonIndex:buttonIndex];
}

This is my code on alertview delegate.
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if(buttonIndex==1){
[alertView dismissWithClickedButtonIndex:-1 animated:true];
alertView=nil;
[self performSegueWithIdentifier:@"xxxx" sender:self];
}
}

Any suggestions please advice ?

QUESTION: Strange Syntax?

Hi there,

one question to one line of the code:

In line 241 of LMAlertView.m you write

_alertContainerView = [[UIView alloc] initWithFrame:(CGRect){.size = [[UIScreen mainScreen] bounds].size}];

I have to say that I never saw this syntax before. I even googled it and haven't found anything similar. I'm talking about "(CGRect){.size =" Can you explain how and why this works?

Greets from Germany
Andi

Crash on rotation of map in nag controller example

When using the demo app, all works fine, except for rotation of the "VC" example. Once the map is visible and the device is rotated, the app crashes. Xcode gives EXC_BAD_ACCESS on line 42 of CALayer+ModalAlert.m

Crashed on device when installed via test flight

Has anyone seen this?

I have no problems when I run on device via Xcode. Deploy via an archive via test flight and I get a crash after init w/ title. Looks to be related to [CALayer setPosition:] call...

screen shot 2013-12-11 at 8 28 48 pm

[LMAlertView show] crashing

I'm getting a lot of crashes in [LMAlertView show] with the following message:

A view can only be associated with at most one view controller at a time! View < UIView: 0x14e94050; frame = (0 0; 320 480); autoresize = W+H; layer = < CALayer: 0x14ef3880 > > is associated with < LMEmbeddedViewController: 0x14ee1950 >. Clear this association before associating this view with < LMEmbeddedViewController: 0x14dc7890 >.
-[LMAlertView show]
in LMAlertView.m on Line 442

is there a fix for this?

thanks.

setTransform doesn't move view to a new position

Like in standard AlertView the following has no effect in LMAlertView

[alertView setTransform:CGAffineTransformTranslate(alertView.transform, 0.0, 10.0)];

Maybe there is an alternative method?

A way to dismiss the alertview

First off, thanks for the awesome library. The rating control alone helped me a ton ๐Ÿ‘

I have a small problem. I have another instance of the LMAlertView with 2 custom buttons which looks like this,

ios simulator screen shot apr 3 2014 10 50 03 pm

Clicking on either of those buttons bring up a SLComposeViewController. Now my problem is when I click on those buttons, the compose view controller appears under the alert view. Like so,

ios simulator screen shot apr 3 2014 10 50 09 pm

If there's a method (like show) to dismiss the alert view, that would be great.

Thank you.

LMEmbeddedViewController seems to always reset the preferredStatusBarStyle

It seems that presenting the LMAlertView from a view with a view controller that sets preferredStatusBarStyle to UIStatusBarStyleLightContent will result in a status bar style reset back to UIStatusBarStyleDefault when the alert view is visible.

My workaround is now to implement preferredStatusBarStyle with a fixed return value to LMEmbeddedViewController.m:

- (UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}

Crash on appearing with keyboard keyboard;

I got crash after selection any button of alert if there is keyboard active before [alert show];

This code leads to crash:

- (void)_addAnimation:(CAAnimation *)anim forKey:(NSString *)key {
    UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;

    if ([keyWindow.rootViewController isKindOfClass:[LMEmbeddedViewController class]]) {
        UIView *view = [self delegate];
        CABasicAnimation *basicAnim = (CABasicAnimation *)anim;
        CGFloat modalWidth = 290.0;

        // Hide _UIParallaxDimmingView. It's making the transparent nav controller go dark when animating
        if ([[[view class] description] hasSuffix:@"DimmingView"]) {
            view.hidden = YES;
        }

        // When pushing a view controller, make the one underneath slide out all the way
               ///CRASH HERE!!!!
        if ([key isEqualToString:@"position"] && basicAnim.fromValue != nil) {
            if ([basicAnim.fromValue CGPointValue].x == (modalWidth / 5.0)) {
                basicAnim.fromValue = [NSValue valueWithCGPoint:CGPointMake(-(modalWidth / 2.0), [basicAnim.fromValue CGPointValue].y)];
            }
        }

        if (view.frame.origin.x == (-0.3 * modalWidth)) {
            CGRect frame = view.frame;
            frame.origin.x = -modalWidth;

            view.frame = frame;
        }
    }

    // Note: this calls original Apple implementation of addAnimation:forKey:
    [self _addAnimation:anim forKey:key];
}

Cannot execute code when other button is pressed

Hello, I'm new to using your class here, and for some reason when my "done" button is pressed, the clickButtonWithIndex method is not being fired. How do I fire off an event when the firstOtherButton is pressed?

The CAAnimation+Blocks needs a reference in the README

If your project is going to depend on another open source project, please add a URL to the README. I don't use CocoaPods, and so I find one using google, but not sure if its the right one (got lots of hits).

Also, why:

import

and not

import "CAAnimation+Blocks.h"

The former implies this is a System header file, not a User one.

Very buggy when working with iOS 8 WebKit

*** WebKit discarding exception: -[WebActionDisablingCALayerDelegate superview]: unrecognized selector sent to instance

I think the problem is caused by

"CALayer+ModalAlert.m"

How do I create an action on send like UIAlertView?

How can I call a delegate method like in UIAlertView?
For example:
LMAlertView *alert = [[LMAlertView alloc] initWithTitle:@"Are you sure you want to send?"
message:theMessage
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Send", nil];
in UIAlertView, this method is called:

  • (void)alertView:(UIAlertView *)alertView
    clickedButtonAtIndex:(NSInteger)buttonIndex{...

What's the equivalent in LMAlertView?

Thank you,
Adam

Orientation Problem

I have just used this library and realized that the alertview is not showing up correct when launched in landscape orientation. The issue is fixed be commenting out the [self transformAlertContainerViewForOrientation]; in the show function in LMAlertView.m. Is it possible to have a flag on the initialisation, or any other solution to avoid commenting out this line?

Keyboard appearance issue

UIKeyboardWillShowNotification observer is only registered in initWithViewController.
Why don't we add this registration logic in other init methods?

I have an issue with keyboard appearance with initWithTitle... method - the keyboard overlaps the alert window.

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.