Comments (7)
What iOS version? Are you using ARC? I will address it this evening. Thanks
from toast.
i'm using ARC. iOS version 5.1
from toast.
I was unable to reproduce this crash. Are you using a navigation controller? I loaded a root controller in a navigation controller, displayed a toast message in the root controller's view, and then pushed a new controller without error (iOS 5.1, ARC, simulator and device). I also simulated a memory warning after pushing the controller to unload the root controller's view and still I didn't experience a crash.
Can you give me more details about your implementation?
from toast.
I'm not using navigation controller. I'm redirecting with
scAppDelegate *appDelegate = (scAppDelegate *)[UIApplication sharedApplication].delegate;
RMMController *controller = [[RMMController alloc] init];
appDelegate.window.rootViewController = controller;
[appDelegate.window addSubview:[controller view]];
[appDelegate.window makeKeyAndVisible];
from toast.
kraag22: a small tip here, but if u were to add the toast to the app delegate's window instead of a view controllers view, u wont have to worry too much. a view controllers view comes and goes, a window lasts forever (almost :P)
from toast.
@kraag22 , your problem is that you're trying to switch screens without some navigation structure. @skela, generally it's bad practice to add directly to the window unless you really need too, because it defeats the purpose of a view hierarchy. But yes, that would work.
from toast.
@scalessec allthough i agree in general that adding to the window directly has to be done with care, but your Toast classes clean themselves away when done + its the only way to guarantee similar behaviour as in android, i.e. when you change screens, the Toast stays visible.
from toast.
Related Issues (20)
- Crash on iOS 11 when displaying a Toast HOT 2
- Hello, can you add animation styles to toast?
- CSToastPositionBottom display not correct running in iPhone X
- Toast appears behind keyboard, not visible to user HOT 1
- how to bind toast in RoboVM
- The position of activity view is not right HOT 1
- Xcode 10 error HOT 2
- Remove existing Toast HOT 1
- Problem on creating loading view with Toast
- Is there a way to block background view?
- 键盘会挡住 HOT 2
- Could not find module 'Toast_Swift' for target 'armv7-apple-ios'; found: arm64, arm64-apple-ios HOT 1
- Toast not working HOT 1
- makeToast got error HOT 1
- Toast is always showing at bottom
- can you add a setting accessibility?
- feature request: verticalOffset(s)
- Hello
- Is it possible to change the size (width height) of the toast?
- how to change activity color
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 toast.