Comments (10)
@Emy87aa
I made a solution for this issue till MoathOthman updates the lib
you can add this func in your AppDelegate it gets the window from SceneDelegate
@available(iOS 13.0, *)
func swichRoot(){
//Flip Animation before changing rootView
animateView()
// switch root view controllers
let storyboard = UIStoryboard.init(name: "Main", bundle: nil)
let nav = storyboard.instantiateViewController(withIdentifier: "HomeView")
let scene = UIApplication.shared.connectedScenes.first
if let sd : SceneDelegate = (scene?.delegate as? SceneDelegate) {
sd.window!.rootViewController = nav
}
}
@available(iOS 13.0, *)
func animateView() {
var transition = UIView.AnimationOptions.transitionFlipFromRight
if !MOLHLanguage.isRTLLanguage() {
transition = .transitionFlipFromLeft
}
animateView(transition: transition)
}
@available(iOS 13.0, *)
func animateView(transition: UIView.AnimationOptions) {
if let delegate = UIApplication.shared.connectedScenes.first?.delegate {
UIView.transition(with: (((delegate as? SceneDelegate)!.window)!), duration: 0.5, options: transition, animations: {}) { (f) in
}
}
}
You can check if ios > 13 then call this func from the AppDelegate
if #available(iOS 13.0, *) {
let delegate = UIApplication.shared.delegate as? AppDelegate
delegate!.swichRoot()
} else {
// Fallback on earlier versions
MOLH.reset()
}
And also check if ios > 13 in the reset func in the AppDelegate to call swichRoot func
from molh.
The crash is happening because we are forced unwrapping the window
from molh.
from molh.
I edited the issue and added screen Shot
from molh.
@supergenedy thanx for the solution .
from molh.
@supergenedy thanx for the solution .
@MoathOthman it does solve the animation crash issue but the language is not getting translated.
from molh.
@imuhammadjabbar did you call MOLH.setLanguageTo("YOUR_LANGUAGE")
?
from molh.
@imuhammadjabbar did you call
MOLH.setLanguageTo("YOUR_LANGUAGE")
?
Yes, I did. ( MOLH.setLanguageTo(currentLanguage == "en" ? "ar" : "en") )
I set my default Language to Ar.
Seems like it is changing now. But My Side Menu is not working. or some images.
How can I change images manually(There were changing automatically with Changing System LAnguage)
And the side menu is not working as well.
Any help would be much appreciated. Thanks
from molh.
@imuhammadjabbar there is a function for images image.flipIfNeeded()
from molh.
fixed in 1.3
from molh.
Related Issues (20)
- Label's font doesn't change with language (Localization) HOT 1
- App Getting Crashed for iOS 13 HOT 9
- Language of UIActivityViewController Does not change when Reset HOT 16
- Kurdish language corrupted text HOT 14
- Canβt embed molh in objective c project HOT 1
- images flip even I forced it to LTR
- Not work fine with Zendesk Chat HOT 7
- reset func not work in version 1.3 HOT 6
- set Default Language to Arabic not working right on first run HOT 19
- Language not changed on camera icons and toolbar
- when change language to Urdu or Arabic and run app , texts font changed to this font HOT 1
- after update xcode and swift version HOT 16
- UIDatePicker & UISearchBar not changing language after reset HOT 3
- i have to close and open app to make view flipped case arabic language is ok but view still not flipped on first time run HOT 1
- Apple pay button text is not localised when we change the language from app but when app is restarted it works fine
- numbers language does not change after localization till restarting the app HOT 4
- App Crash Randomly HOT 3
- Regressed crash in MOLH file HOT 2
- Back button direction wrong
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from molh.