Skip to content

Conversation

@ghvillasboas
Copy link

  • Adding a generic UIView on the alert to supply the feature removed from early versions iOS 7 betas. (can be used as UIImageViews, TableViews, or any other UIView subclass)
  • Added the parallax effect commited by @Fr4ncis with some little tweeks
  • Removal of some warnings due API's deprecation
  • Code is iOS 7 only

Usage: Just set the property -contentView: or alloc/init with the designated initializer and you're good to go.

Usage example:

img_6248

@andrewstephenson-v1
Copy link

Nice, but shouldn't the title be at the top?

On Tue, Sep 3, 2013 at 4:38 AM, George Villasboas
notifications@github.com wrote:

@ghvillasboas
Copy link
Author

@iOSDevil Depends on your use case. We could easily change this behavior or add an extra property so the user can decide. My idea was to mimmic a feature of UIAlertView introduced on iOS[redacted] and suddenly pulled out on later betas: the contentView.

@andrewstephenson-v1
Copy link

Top is best for me.

I'm looking through the code now 





Thanks

On Tue, Sep 3, 2013 at 1:26 PM, George Villasboas
notifications@github.com wrote:

@iOSDevil Depends on your use case. We could easily change this behavior or add an extra property so the user can decide. My idea was to mimmic a feature of UIAlertView introduced on iOS[redacted] and suddenly pulled out on later betas: the contentView.

Reply to this email directly or view it on GitHub:
#37 (comment)

@kyoji2
Copy link
Member

kyoji2 commented Sep 3, 2013

Looks great! Will take a further review soon.

@andrewstephenson-v1
Copy link

iOS6 Noticed a crash when setting a title
-[__NSCFString boundingRectWithSize:options:attributes:context:]: unrecognized selector sent to instance 0x14b81d00

Otherwise seems fine on iOS6

@ghvillasboas ghvillasboas mentioned this pull request Sep 5, 2013
@ghvillasboas
Copy link
Author

@iOSDevil I think the parallax effect doesn't work on iOS 6 either.
About the crash, its because iOS 7 has a complete new way to deal with fonts. I believe with some little tweaks using the old APIs you can get them running smoothly.

Best.
G.

@andrewstephenson-v1
Copy link

Thanks mate, I did find the new style code but not using a title looks better for how I'm using this.

On Thu, Sep 5, 2013 at 3:30 PM, George Villasboas
notifications@github.com wrote:

@iOSDevil I think the parallax effect doesn't work on iOS 6 either.
About the crash, its because iOS 7 has a complete new way to deal with fonts. I believe with some little tweaks using the old APIs you can get them running smoothly.
Best.

G.

Reply to this email directly or view it on GitHub:
#37 (comment)

@rhfung
Copy link

rhfung commented Oct 22, 2013

I definitely found the contentView useful. I wrote a very similar "accessoryView" that does exactly the same thing.

rhfung@1b87c33

@ghvillasboas
Copy link
Author

@rhfung Nice. I'll take a look on that. Thanks for sharing.

@apotry
Copy link

apotry commented Mar 27, 2014

Nice addition! But had to update the setContentView method and change _containerView to _contentView:

- (void)setContentView:(UIView *)contentView
{
  _contentView = contentView;
  [self invalidateLayout];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants