-
Notifications
You must be signed in to change notification settings - Fork 518
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
Remove messageLabel and titleLabel #204
Comments
Hey there! The default view controller is just a convenience view that resembles UIAlertController layout. For custom layouts, you can always pass a custom view controller. Moreover, title and message are optional and should take zero space if not provided. Still, for custom layouts custom view controllers are the way to go. |
Thanks for the quick reply. I may go with the custom view controller approach then. However, I didn't feel like title and message are optional since I tried passing in both "" and nil for them in the constructor and still they occupied empty space. I'm attaching a screenshot for title = nil and message = nil. Not an issue anymore as long as I can use a custom view controller, but just to let you know. Or am I missing something? let popup = PopupDialog(title: nil, message: nil, image: UIImage(contentsOfFile: data[indexPath.row])!) |
Unfortunately, that's feature is not presented at this time. Yes, you could pass a
For achieving that result, your should reassemble those (30, 8, 30) constraints with zero values (modify source code). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I kinda got it to do what was needed with this code... I know it's not elegant... But it works. In PopupDialogDefaultView.swift below the inits
And this in the image, title & message setters on PopupDialogDefaultViewController.swift
Hope it helps someone out :) |
Hi, thanks for the library, it's awesome! I was wondering if there is a way to remove both the messageLabel and titleLabel from the DefaultView? I'm not familiar with the programmatic constraint stuff. I don't mind having title and message in the constructor, just a simple solution to remove those areas from the view would be fine. Also as a feedback, I think it would be cool to have options to disable certain areas of the popup. Thanks.
The text was updated successfully, but these errors were encountered: