Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I remove inner shadow and rounded corners? #1

Open
Ricardo1980 opened this issue May 4, 2012 · 2 comments
Open

How can I remove inner shadow and rounded corners? #1

Ricardo1980 opened this issue May 4, 2012 · 2 comments

Comments

@Ricardo1980
Copy link

Thanks for your library, it's very useful.
How can I remove inner shadow and rounded corners?
Regards,
Ricardo.

@mgrebenets
Copy link
Owner

Hi. You can have whatever corners you want. Just make your own rectangular image, like the one in samples but with non-rounded corners and set it using

+ (void)setBackgroundImageName:(NSString *)imageName;

That should do it.

Inner shadow and some gradient, as I recall, is added later by UIKit, so there isn't much you can do about it.
Found it right here
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIPopoverBackgroundView_class/Reference/Reference.html

Note: The images you use for your popover background view should not contain any shadow effects. The popover controller adds a shadow to the popover for you.

@Ricardo1980
Copy link
Author

When I show a modal VC, if I want to remove external round corners, I use

#import QuartzCore/QuartzCore.h

-(void) viewWillAppear:(BOOL)animated {
// must be on viewWillAppear, otherwise will fail after rotating
self.view.layer.cornerRadius = 0;
[super viewWillAppear:animated];
}

But I don''t find a way inside a popover.

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

No branches or pull requests

2 participants