cezarywojcik / CWPopup

CWPopup category to present popup view controllers
MIT License
289 stars 62 forks source link

Added an offset parameter to the popup view #10

Closed guilhermearaujo closed 10 years ago

guilhermearaujo commented 10 years ago

As I described on issue #9. I decided to examine the code and turns out it was quite simple to implement. Here's an usage example, modified from the original code example.

SamplePopupViewController *samplePopupViewController = [[SamplePopupViewController alloc] initWithNibName:@"SamplePopupViewController" bundle:nil];

// Add the following line to change the offset
[samplePopupViewController setPopupViewOffset:CGPointMake(0, -40)];

[self presentPopupViewController:samplePopupViewController animated:YES completion:^(void) {
    NSLog(@"popup view presented");
}];

If no offset is set, nothing will change and the view will be centered on screen.

ezrasuki commented 10 years ago

This property (popupViewOffset) is not included in the latest version I downloaded from cocoapods (1.2.5).