Giter Club home page Giter Club logo

uamodalpanel's Introduction

What is UAModalPanel?

UAModalPanel Example PicUAModalPanel Example Pic 2UAModalPanel Example Pic 3

UAModalPanel is a highly customizable, alternative modal panel that you can popup in your view controllers to show content that might not need an entire new screen to show. It has a bounce animation, content fade-in, and a fancy noisy-gradient title bar. It works on the iPhone and iPad, with or without rotation.

Example Video

http://www.youtube.com/watch?v=AJDR0GAsV9E

Step 0: Prerequisites

You'll need at least Xcode 3.2 and an iOS 4.0+ project

Step 0.5: CocoaPods way

CocoaPods is the recommended way to use UAModalPanel in your project.

  • Simply add this line to your Podfile: pod 'UAModalPanel', '~> 1.2'
  • Run pod install
  • Go directly to Step 3

Step 1: Get UAModalPanel files (add as Git submodule)

In terminal navigate to the root of your project directory and run these commands (assuming your project is a git repo):

git submodule add git://github.com/coneybeare/UAModalPanel.git Submodules/UAModalPanel
git commit -m 'UAModalPanel added as submodule'

This creates new submodule, downloads the files to Submodules/UAModalPanel directory within your project and creates new commit with updated git repo settings. Thanks to the fact that you added UAModalPanel as submodule, it is easy to keep it updated to the newest version by simply doing:

git submodule update

Step 2: Add UAModalPanel to your project

Copy files from example project

  • Open both the example project (that you downloaded in step 1 above) and your app's project in XCode.
  • Drag the UAModalPanel Group from the example project into your project's Groups & Files.
  • Make sure the "Copy items into destination group's folder (if needed)" checkbox is UNchecked.

XCode 4 note: adding the files is different in Xcode 4 - first, make sure your UAModalPanel project window is closed, then you drag the UAModalPanel.xcodeproj file (from a Finder window) to your project. You should see the UAModalPanel's proj tree open up within your project in XCode, and then you should be able to drag UAModalPanel group as stated above. You then must remove UAModalPanel.xcodeproj (whole UAModalPanel project) from your project, so that it does not interfere with your project.

Add Frameworks

Expand the 'Frameworks' group in your project's file list. Make sure you have the following framework installed:

  • QuartzCore.framework

If you are missing any frameworks, right click the 'Frameworks' group and select Add -> Existing Frameworks. Select the framework you are missing and add it to your project.

Step 3: Implement UAModalPanel

Subclass UAModalPanel

The best way to use the panel is to subclass it and add your own elements to the contentView. To get a plain modal panel, subclass UAModalPanel . To get a titled modal panel, subclass UATitledModalPanel. Check out the example project for a sample subclass, UAExampleModalPanel

Add UAModalPanel to a View Controller

Display the panel by creating an instance of your subclass and show it from a point:

- (IBAction)showModalPanel:(id)sender {
    UAModalPanel *modalPanel = [[[UAExampleModalPanel alloc] initWithFrame:self.view.bounds] autorelease];
    [self.view addSubview:modalPanel];
    [modalPanel showFromPoint:[sender center]];
}

UAModalPanel knows how to close itself, but if you want more control or action button handling, read on.

Optional Event Handling

You can optionally implement either the UAModalPanelDelegate methods for callbacks and validations...

// Optional: This is called before the open animations.
//   Only used if delegate is set and not using blocks.
- (void)willShowModalPanel:(UAModalPanel *)modalPanel;

// Optional: This is called after the open animations.
//   Only used if delegate is set and not using blocks.
- (void)didShowModalPanel:(UAModalPanel *)modalPanel;

// Optional: This is called when the close button is pressed
//   You can use it to perform validations
//   Return YES to close the panel, otherwise NO
//   Only used if delegate is set and not using blocks.
- (BOOL)shouldCloseModalPanel:(UAModalPanel *)modalPanel;

// Optional: This is called when the action button is pressed
//   Action button is only visible when its title is non-nil;
//   Only used if delegate is set and not using blocks.
- (void)didSelectActionButton:(UAModalPanel *)modalPanel;

// Optional: This is called before the close animations.
//   Only used if delegate is set and not using blocks.
- (void)willCloseModalPanel:(UAModalPanel *)modalPanel;

// Optional: This is called after the close animations.
//   Only used if delegate is set and not using blocks.
- (void)didCloseModalPanel:(UAModalPanel *)modalPanel;

...or you can use blocks when creating the panel.

// The block is responsible for closing the panel,
//   either with -[UAModalPanel hide] or -[UAModalPanel hideWithOnComplete:]
//   Panel is a reference to the modalPanel
    modalPanel.onClosePressed = ^(UAModalPanel* panel) {
        // Do something awesome when the close button is pressed
        [panel hideWithOnComplete:^(BOOL finished) {
            // Do something else awesome after it closes.
        }];
    };
    
//   Panel is a reference to the modalPanel
    modalPanel.onActionPressed = ^(UAModalPanel* panel) {
        // Do something awesome when the action button is pressed
    };

Animation Hooks

You can add any of these methods to your subclass to get hooks at various points of the bounce animation.

- (void)showAnimationStarting;
- (void)showAnimationPart1Finished;
- (void)showAnimationPart2Finished;
- (void)showAnimationPart3Finished;
- (void)showAnimationFinished;

Logging

You can add UAMODALVIEW_DEBUG as a preprocessor macro on your project to turn on some potentially useful logging in UAModalPanel.

Step 4: Customize UAModalPanel

The best place to customize is in your UAModalPanel subclass.

UAModalPanel Customizations

// Margin between edge of container frame and panel. Default = {20.0, 20.0, 20.0, 20.0}
self.margin = UIEdgeInsetsMake(10.0, 20.0, 30.0, 20.0);
    
// Padding between edge of panel and the content area. Default = {20.0, 20.0, 20.0, 20.0}
self.padding = UIEdgeInsetsMake(10.0, 20.0, 30.0, 20.0);
    
// Border color of the panel. Default = [UIColor whiteColor]
self.borderColor = [UIColor blueColor];
    
// Border width of the panel. Default = 1.5f;
self.borderWidth = 5.0f;
    
// Corner radius of the panel. Default = 4.0f
self.cornerRadius = 10.0f;
    
// Color of the panel itself. Default = [UIColor colorWithWhite:0.0 alpha:0.8]
self.contentColor = [UIColor yellowColor];
    
// Shows the bounce animation. Default = YES
self.shouldBounce = NO;

// Shows the actionButton. Default title is nil, thus the button is hidden by default
[self.actionButton setTitle:@"Foobar" forState:UIControlStateNormal];

UATitledModalPanel customizations

// Height of the title view. Default = 40.0f
self.titleBarHeight = 80.0f;
    
// The background color gradient of the title
CGFloat colors[8] = {0, 1, 1, 1, 1, 1, 0, 1};
[self.titleBar setColorComponents:colors];
    
// The header label, a UILabel with the same frame as the titleBar
self.headerLabel.font = [UIFont boldSystemFontOfSize:24];

UANoisyGradientBackground and UAGradientBackground customizations

// The gradient style (Linear, linear reversed, radial, radial reversed, center highlight). Default = Linear
[[self titleBar] setGradientStyle:UAGradientBackgroundStyleCenterHighlight];
    
// The line mode of the gradient view (top, bottom, both, none)
[[self titleBar] setLineMode:UAGradientLineModeNone];
    
// The noise layer opacity
[[self titleBar] setNoiseOpacity:0.3];

Step 5: There is no step 5.

That's it. Please feel free to fork and submit pull requests, fix issues or whatever else.

ARC Support

UAModalPanel is not using ARC, but you can use it in your ARC project by adding -fno-objc-arc compiler flag to the "Compile Sources" section found in the Target's "Build Settings" tab

ARC Settings

Contributing to UAModalPanel

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Test it by adding it to the sample app and ensuring everything works as intended with both your change, and the existing code.
  6. Create new Pull Request

App that are using UAModalPanel:

If you are using UAModalPanel, please contact me to get added to this list!

Get in touch:

What Does UA stand for?

Urban Apps. We make neat stuff. Check us out.

Open-Source Urban Apps Projects

  • Armchair - A simple yet powerful App Review Manager for iOS and OSX (Swift)
  • UAAppReviewManager - An app review prompting tool for iOS and Mac App Store apps.
  • UALogger - A logging utility for Mac/iOS apps
  • UAObfuscatedString - A simple NSString category to hide sensitive strings
  • UAProgressView A simple and lightweight, yet powerful animated circular progress view
  • Urban - An Xcode color scheme that uses a soft dark background, with subtle blue, orange and yellow colors

Donate:

Please support us so that we can continue to make UAModalPanel even more awesome! If you are feeling particularly generous, please buy me a beer!

Paypal Button

Bitdeli Badge

uamodalpanel's People

Contributors

barrettj avatar bitdeli-chef avatar coneybeare avatar d4kr avatar ealeksandrov avatar funkadelic avatar kambala-decapitator avatar kennethmac2000 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  avatar  avatar

uamodalpanel's Issues

iOS 4 Compatibility broken?

Just ran this nice little library on an iOS 4.3 device and noticed a crash:

In the actionButton method of UAModalPanel:
-[UIImage resizableImageWithCapInsets:]: unrecognized selector sent to instance

[UIImage resizableImageWithCapInsets] is iOS 5+ only.

Delay

Hello,

I am trying to track down a delay. I am getting a delay of around 1.4seconds or so between willShowModalPanel and my layoutSubViews method in my uatitledmodalpanel inherited class.

Any help would be appreciated
m

Add Size instead of Margins

I've setup my code to basically allow me to set the size of the panel and have it figure out the correct margins and resize accordingly based on rotation. If anyone wants to add this feel free to use my work ;) The code below is the setup I used for my custom UAModalPanel regarding size.

- (id)initWithFrame:(CGRect)frame withimage:(UIImage *)image {

    if ((self = [super initWithFrame:frame])) {

        [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
        [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(didRotate:)
                                                    name:@"UIDeviceOrientationDidChangeNotification" 
                                                  object:nil];

        float contentWidth = 250;
        float contentHeight = 250;

        float xCenter = (frame.size.width / 2);
        float yCenter = (frame.size.height / 2);

        float topEdge = 0;
        float bottomEdge = 0;
        float leftEdge = 0;
        float rightEdge = 0;


        if ([[[UIDevice currentDevice] model] isEqualToString:@"iPad"]) {

            contentWidth = 500;
            contentHeight = 500;
        } 

        MA_MobileAppDelegate *appDelegate = (MA_MobileAppDelegate *)[[UIApplication sharedApplication] delegate];

        UIInterfaceOrientation orientation = appDelegate.tabBarController.interfaceOrientation;

        switch (orientation) {

            case UIDeviceOrientationPortrait:

                NSLog(@"Initial right side up");

                topEdge = frame.size.height - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frame.size.width - (xCenter + (contentWidth / 2));

                break;

            case UIDeviceOrientationPortraitUpsideDown:

                NSLog(@"Initial upsideDown");

                topEdge = frame.size.height - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frame.size.width - (xCenter + (contentWidth / 2));

                break;

            case UIDeviceOrientationLandscapeRight:

                NSLog(@"Initial right");

                topEdge = frame.size.height - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frame.size.width - (xCenter + (contentWidth / 2));

                break;

            case UIDeviceOrientationLandscapeLeft:

                NSLog(@"Initial Left");

                topEdge = frame.size.height - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frame.size.width - (xCenter + (contentWidth / 2));

                break;

            default:
                break;
        }



        self.margin = UIEdgeInsetsMake(topEdge, leftEdge, bottomEdge, rightEdge);

        self.padding = UIEdgeInsetsMake(20.0, 20.0, 20.0, 20.0);

        self.borderColor = [UIColor whiteColor];

        self.borderWidth = 1.5f;

        self.cornerRadius = 4.0f;

        self.contentColor = [UIColor colorWithWhite:0.0 alpha:0.8];

        self.shouldBounce = YES;


        UIImageView *imageView = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
        [imageView setImage:image];
        [imageView setContentMode:UIViewContentModeScaleAspectFit];

        view = imageView;

        [self.contentView addSubview:view];

    }   
    return self;
}

- (void) didRotate:(NSNotification *)notification { 

    MA_MobileAppDelegate *appDelegate = (MA_MobileAppDelegate *)[[UIApplication sharedApplication] delegate];

    UIInterfaceOrientation orientation = appDelegate.tabBarController.interfaceOrientation;

    if (currentOrientation != orientation) {

        float contentWidth = 250;
        float contentHeight = 250;

        frameWidth = self.contentContainer.frame.size.width;
        frameHeight = self.contentContainer.frame.size.height;

        float xCenter = (frameWidth / 2);
        float yCenter = (frameHeight / 2);

        float topEdge = 0;
        float bottomEdge = 0;
        float leftEdge = 0;
        float rightEdge = 0;

        if ([[[UIDevice currentDevice] model] isEqualToString:@"iPad"]) {

            contentWidth = 500;
            contentHeight = 500;
        } 

        switch (orientation) {

            case UIDeviceOrientationPortrait:

                topEdge = frameHeight - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frameWidth - (xCenter + (contentWidth / 2));

                currentOrientation = orientation;

                break;

            case UIDeviceOrientationPortraitUpsideDown:

                topEdge = frameHeight - (yCenter + (contentHeight / 2));
                bottomEdge = (yCenter - (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frameWidth - (xCenter + (contentWidth / 2));

                currentOrientation = orientation;


                break;

            case UIDeviceOrientationLandscapeRight:

                topEdge =  (yCenter - (contentHeight / 2));
                bottomEdge = frameHeight - (yCenter + (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frameWidth - (xCenter + (contentWidth / 2));

                currentOrientation = orientation;

                break;

            case UIDeviceOrientationLandscapeLeft:

                topEdge =  (yCenter - (contentHeight / 2));
                bottomEdge = frameHeight - (yCenter + (contentHeight / 2));
                leftEdge = (xCenter - (contentWidth / 2));
                rightEdge = frameWidth - (xCenter + (contentWidth / 2));

                currentOrientation = orientation;

                break;

            default:
                break;
        }

        self.margin = UIEdgeInsetsMake(topEdge, leftEdge, bottomEdge, rightEdge);

        [self setNeedsLayout];
    }

}

Mixing of coordinate system at various points in code

I have been working a bit with UAModalPanel and have hit up against a few scenarios where things haven't been working as I expect them to. I have managed to trace these issues to what I think is a mixing up of the coordinate systems of different views at various points in the code.

Diving into the detail:

  1. In the roundedRectFrame: method of UAModalPanel, I think that all references to self.frame should in fact be to self.contentContainer.bounds, since self.frame is expressed in terms of the UAModalPanel's superview's coordinate system, which has no relation or connection to the frame of the rounded rectangle, which by definition is expressed in terms of self.contentContainer's coordinate system.

  2. In the show: method of UAModalPanel, I think that the line of code "self.contentContainer.center = self.center;" doesn't make sense, since self.center is expressed in terms of the UAModalPanel's superview's coordinate system, while self.contentContainer.center is expressed in terms of the UAModalPanel (self)'s coordinate system, and these will not necessarily be exactly overlapping (ie, where an (x,y) coordinate in one represents the same point on the screen as the same (x,y) coordinate in the other), nor should they have to be.

Additionally, it is unclear what the intended purpose of this line of code is anyway. In scenarios where self and self.contentContainer's frames are not exactly overlapping, this line breaks (as far as I can see) the correct display of the panel, even when only the show: method (as opposed to the showFromPoint: method) is called.

  1. In the showFromPoint: method of UAModalPanel, it seems incorrect to set self.contentContainer.center to the value of "point", as "point" will be expressed in terms of the UAModalPanel's superview's coordinate system (since that is the only coordinate system that the caller could be aware of; or, more specifically, the caller is not aware of self.contentContainer).

  2. If the thesis in (3) is correct, it would appear that the same problem also exists in the hide: and hideWithOnComplete: methods, as these both also use the value of "point" (here as "startEndPoint") to set the value of self.contentContainer.center.

Graphical glitch as sub view of tabbarcontroller.

I've added the panel as a sub view of my tabbarcontroller controller. When the app rotates, the grey background doesn't cover the navbar or the tabbar. When the rotation finishes it appears normal again. Any Ideas?

Can hide navigation bar?

All examples I saw, UAModalPanel hides the navigation bar, but when I have implemented in my project, the navigation bar doesn't hide. I use in TableViewController.

UAModalPanel with UIViewController instead of UIView subclass

I tried UIModalPanel library and I really like it. My problem is that this library uses subclasses of UIView in all examples and then uses addSubview: . I would like to subclass a UIViewController which controls my view and then use: addChildViewcontroller and addSubview. The reason is that I need to manage application logic in that class and UIView would not be appropriate. Is that possible?

More instructions for ARC would be helpful

Specifically, in my ARC project, if I add a view to contentView, will UAModalPanel still take care of retaining and deallocating it when it doesnt need it? or if not how else do I do that?

Also, if I subclass UAModalPanel, does that subclass need to be compiled with the -fno-objc-arc flag? Or can I use ARC in the subclass?

Also, when i have an instance of UAModalPanel in my code, do I have to do anything special like retain and deallocate it, or will ARC take care of that for me just like any other class i use?

contentView is always (0,0,0,0) when constructing panel

Customizing the panel fails in most cases because you cannot read the size of the content area.

Workaround:

  1. after instantiating the panel (initWithFrame:), add it to the target view
  2. call [panel layoutSubviews]; to force it to calculate its TRUE sizes
  3. run the customization code

NB: this means you must not put your panel-contents-code into "initWithFrame:" - because during that method you have no way to get your sizes correct ... unless it's safe to call layoutSubviews inside the constructor?

(your example panel ignores sizes, so doesn't have this problem)

Tag version

Hi,

it's possible to tag the current version so I can create a spec file for cocoapods?

Thx
Davide

Memory leak?

When I run your example project through Instruments/Leaks it shows me some leaks after the panel has been opened, closed, opened and closed again.
I'm just wondering if this is a leak in the code, or a bug in Instruments.
I'm using Xcode 4.5 beta so it's possibly a bug.

Have you tried running instruments on this?

Thanks

Smaller size with full screen background mask

This is a great plugin, thanks.
If I create a UAModalPanel with frame size 320x300, is there a way to still have the full screen background mask behind it?

I have played with the code a bit and can get a full screen mask by changing the self = [super initWithFrame:frame]; frame size, but then the content view and frame show half off the screen and not the correct size.

Any tips?

Thanks

closeButton appears under contentView in certain circumstances

The closeButton: and actionButton: methods of UAModalPanel both use insertSubview:aboveSubview: to add their respective views to self.contentContainer. The contentView: method on the other hand uses the more basic addSubview: method.

From what I can see, two improvements would make sense here:

  1. The insertSubview:aboveSubview: calls in closeButton: and actionButton: should say "aboveSubview:self.contentView" instead of "aboveSubview:self.roundedRectangle", since contentView must be above roundedRectangle for everything to look correct, and, currently (ie, without this change), in situations where the UAModalPanel instance's top and left padding values are small, contentView obscures closeButton due to closeButton being below contentView in the view hierarchy.

  2. As an additional enhancement, in the contentView: method, the addSubview: call should be replaced with the following call:

[self.contentContainer insertSubview:contentView aboveSubview:self.roundedRect];

This makes it more clear what is going on and doesn't require one to think about the implicit ordering behaviour that is made use of when calling addSubview:.

iOS 6 compatibility errors

I'm not sure if you've tried out iOS6 and xCode 4.5, but this gives errors about the constraints. I think it's to do with the popping up animation as it doesn't appear from where it's set to appear from. The constraints system seems to have been changed in xCode 4.5
Here's an example of the errors:

2012-06-18 10:47:08.647 iSlide[2829:907] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1e8c3c60 h=--& v=--& H:[UIView:0x1e8b3730(0)]>",
"<NSLayoutConstraint:0x1e8b2720 H:[UILabel:0x1e8b3010(42)]>",
"<NSLayoutConstraint:0x1e8b4b80 H:[UILabel:0x1e8b3010]-(NSSpace(20))-| (Names: '|':UIView:0x1e8b3730 )>",
"<NSLayoutConstraint:0x1e8b4b40 H:[UILabel:0x1e8b37c0]-(NSSpace(8))-[UILabel:0x1e8b3010]>",
"<NSLayoutConstraint:0x1e8b49a0 UILabel:0x1e8b37c0.centerX == UIView:0x1e8b3730.centerX>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1e8b2720 H:[UILabel:0x1e8b3010(42)]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2012-06-18 10:47:08.666 iSlide[2829:907] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1e8c3c60 h=--& v=--& H:[UIView:0x1e8b3730(0)]>",
"<NSLayoutConstraint:0x1e8b4fc0 H:[UILabel:0x1e8b34b0]-(NSSpace(20))-| (Names: '|':UIView:0x1e8b3730 )>",
"<NSLayoutConstraint:0x1e8b4f40 UILabel:0x1e8b34b0.leading == UILabel:0x1e8b30b0.leading>",
"<NSLayoutConstraint:0x1e8b4e40 UILabel:0x1e8b30b0.leading == UILabel:0x1e8b3280.leading>",
"<NSLayoutConstraint:0x1e8b4dc0 UILabel:0x1e8b3280.leading == UILabel:0x1e8b46f0.leading>",
"<NSLayoutConstraint:0x1e8b4c80 UILabel:0x1e8b46f0.leading == UILabel:0x1e8b3010.leading>",
"<NSLayoutConstraint:0x1e8b4b40 H:[UILabel:0x1e8b37c0]-(NSSpace(8))-[UILabel:0x1e8b3010]>",
"<NSLayoutConstraint:0x1e8b49a0 UILabel:0x1e8b37c0.centerX == UIView:0x1e8b3730.centerX>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1e8b4b40 H:[UILabel:0x1e8b37c0]-(NSSpace(8))-[UILabel:0x1e8b3010]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2012-06-18 10:47:08.674 iSlide[2829:907] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x1e8c3c60 h=--& v=--& H:[UIView:0x1e8b3730(0)]>",
"<NSLayoutConstraint:0x1e8b4fc0 H:[UILabel:0x1e8b34b0]-(NSSpace(20))-| (Names: '|':UIView:0x1e8b3730 )>",
"<NSLayoutConstraint:0x1e8b4f00 H:[UILabel:0x1e8b44c0]-(NSSpace(8))-[UILabel:0x1e8b34b0]>",
"<NSLayoutConstraint:0x1e8b4c00 H:|-(NSSpace(20))-[UILabel:0x1e8b44c0] (Names: '|':UIView:0x1e8b3730 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1e8b4f00 H:[UILabel:0x1e8b44c0]-(NSSpace(8))-[UILabel:0x1e8b34b0]>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

specify size

Is there any way I can simply specify how large the panel should be?

I always want it to be centered. I want the light gray view to take over the entire view I"m adding the panel as a subview. But I always want the panel to be say 200x200 whether on iphone or ipad.

Is this possible?

issues with intiWithFrame:CGRectMake

Hi,

first of all great work.
Unfortunately I'm experiencing an error when not using initWithFrame:self.view.bounds but instead initWithFrame:CGRectMake(40,90,220,100).
The panel is somehow presented but unfortunately in 3 not connected parts. The Background is presented at the correct position, the roundect got an x,y offset of approx 60,80 and the content within gets another offset of about the same.

What's wrong ?

Cheers, Peter

Rotation Support?

Can someone add Rotation support for this? I have no idea how to do that otherwise I'd do it myself ;)

Fixed portrait position

Hi, my app support portrait and landscape orientations, but when using the UAModalPanel view, I need that (UAModalPanel) to be fixed to portrait orientation. I don't find a suitable property in the class UIModalPanel.h to do so. Can you provide a workaround to fix that ?

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.