peterprokop / SwiftOverlays

SwiftOverlays is a Swift GUI library for displaying various popups and notifications
MIT License
631 stars 83 forks source link

Indicator getting placed below table header #7

Closed wstudios closed 9 years ago

wstudios commented 9 years ago

The indicator works great except that it is getting place below the table header and also the cell borders.

peterprokop commented 9 years ago

@wstudios can you please provide screenshot/gif for the issue? What kind of controller do you use? UITableViewController?

wstudios commented 9 years ago

Thank you very much for your prompt reply. I am using both UITableViewController and table inside of a view. In both cases it occurs but I think i narrowed it down to the use of custom cells. It seems to work fine in tables that have subtitle or basic. I have attached both cases that it occurs in my project. loading_1 loading_2

Hope this helps, thanks.

peterprokop commented 9 years ago

@wstudios I suggest using simple UIViewController instead of UITableViewController and adding UITableView as a subview. The problem is that UITableViewController's view is actually a UITableView.

If for some reason you can't use UIViewController, you can do something like: SwiftOverlays.showCenteredWaitOverlayWithText(self.view.superview!, text: "Please wait...") SwiftOverlays.removeAllOverlaysFromView(self.view.superview!) (but in that case overlay will be added to the superview).

wstudios commented 9 years ago

Thanks very much for the reply, unfortunately when I add that code the app crashes with the following error: fatal error: unexpectedly found nil while unwrapping an Optional value

peterprokop commented 9 years ago

You should obviously do that only if superview is available - for example in viewDidAppear method of your controller.