rushisangani / RSSelectionMenu

An elegant selection list or dropdown menu for iOS with single or multiple selections.
MIT License
351 stars 91 forks source link

Formsheet height incorrect after 5.1.1 update #48

Closed SpajicM closed 6 years ago

SpajicM commented 6 years ago

I was using RSSelectionMenu with Formsheet style fine with version 5.0, after updating to 5.1.1 Formsheet height goes to the bottom of the screen.

New Actionsheet and Alert styles work ok.

rushisangani commented 6 years ago

@SpajicM Could you please share a screenshot or relevant details for the issue?

SpajicM commented 6 years ago

@rushisangani On 5.0 it was ok, like a box with same width, height. Formsheet (not ok): simulator screen shot - iphone 8 - 2018-09-06 at 12 58 56 Alert (working ok): simulator screen shot - iphone 8 - 2018-09-06 at 12 54 30

d33pak-s1ngh commented 6 years ago

@rushisangani have found any solution for this ?

rushisangani commented 6 years ago

@d33pak-s1ngh didn't get time to resolve yet.

rushisangani commented 6 years ago

@SpajicM I could not be able to replicate this issue on my device or simulator. However, I've changed the frames or Formsheet menu. Could you please check if this happening in latest version 5.3 or not?

SpajicM commented 6 years ago

Still the same issue.

I'm using alert for time being but I prefer Formsheet since it allows dismiss by clicking outside the popup.

rushisangani commented 6 years ago

@SpajicM Can you please describe a bit more about this issue? Like Xcode version, iOS version and device or simulator specification?

You can also share the code if possible? There may be some issue with the ViewController from which the menu is shown.

SpajicM commented 6 years ago

ok I've looked into it a little bit deeper,

Issue was introduced at https://github.com/rushisangani/RSSelectionMenu/commit/07ad1c53c4a7b8580fd2e4afb5cf8739562b4553 and problem is it's going to else block even when in portrait, as can be seen from this screenshot

http://tinypic.com/r/2wnpj0g/9

iPhone 8 simulator iOS 12 (previously 11, same thing) Xcode 10 (previously 9, same thing)

It might be a simulator-only issue, can't test at real device at the moment.

rushisangani commented 6 years ago

@SpajicM Thanks. It would help me look further.

d33pak-s1ngh commented 6 years ago

@SpajicM I have faced this issue on real ios device.

rushisangani commented 6 years ago

@SpajicM Can you please try to replace the code below and check if it works correctly, since I can not reproduce it on my device.

RSSelectionMenuController.swift Replace line number 183 with following.

UIApplication.shared.statusBarOrientation == .portrait

SpajicM commented 6 years ago

@rushisangani Works fine with that :)