Closed Lokeshgupta25 closed 4 years ago
That isn't normal. I'd remove
alertView.configureBackgroundView(width:1000)
It isn't needed.
alertView.configureBackgroundView(width:1000) its working same after removing this also
My Singleton class for this.. class Messages : NSObject {
static let shared = Messages()
//MARK: - Show Alert Problem
func show(alert title : Alert , message : String , type : Type){
var alertConfig = SwiftMessages.defaultConfig
alertConfig.presentationStyle = .top
alertConfig.prefersStatusBarHidden = true
alertConfig.presentationContext = .window(windowLevel: UIWindow.Level.statusBar)
alertConfig.duration = .seconds(seconds: 2.0)
alertConfig.shouldAutorotate = true
let alertView = MessageView.viewFromNib(layout: .messageView)
alertView.button?.isHidden = true
alertView.configureDropShadow()
alertView.titleLabel?.font = UIFont.systemFont(ofSize: 14.0, weight: UIFont.Weight.regular)
alertView.bodyLabel?.text = message
alertView.bodyLabel?.font = UIFont.systemFont(ofSize: 14.0, weight: UIFont.Weight.regular)
alertView.configureContent(title: title.rawValue, body: message)
alertView.titleLabel?.textColor = UIColor.white
alertView.bodyLabel?.textColor = UIColor.white
SwiftMessages.show(config: alertConfig, view: alertView)
}
}
But when i change my app from portrait mode to landscape within in app this alert are not taking complete width of screen on landscape mode.
Can you reproduce it in the demo app?
ya sure
Please follow the follwing step: App launch on Portrait mode -> click on button for showing Alert -> Change App mode to Landscape -> click on button for showing Alert
It works for me. Your environment must be different. I'm using:
Xcode 11.4.1 iPhone 11 Pro simulator
No Please Switch app on landscape mode when portrait mode alert have dismiss.
Oh, this is related to the new scene stuff in iOS 13. You need to use the head of the master branch. I have a backlog of fixes to release including the fix for this issue.
Can you elaborate it more how can I resolve this issue ASAP. Thanks
You need to use the head of the master branch.
have you fixed this issue or you are going to fix this issue?
Included in 8.0.0 release
When i change our app mode from portrait to landscape mode swiftmessages width not adjust to full width of screen . How can i solve this?
i am using follwing code...
In portrait mode![Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-24 at 18 12 23](https://user-images.githubusercontent.com/47971613/80213490-deb5fe80-8656-11ea-8ba2-82dfdb02d2b3.png)
On in Landscape mode...![Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-24 at 18 12 17](https://user-images.githubusercontent.com/47971613/80213397-bcbc7c00-8656-11ea-8286-983c5a99a12f.png)