Blackberry Screen Transitions on close - blackberry

Hey everyone,
I'm doing a Blackberry App compatible with OS4.5+ and I'd like to do some screen transitions. I know how to do them through the screen's sublayout method when I push a screen to the UiApplication, but when I wan't to make one disappear (like when I press the back button), I can't seem to find anything.
Can anyone help?
Thanks in advance!

You will have to override the onClose() method on each of your screens.

I don't think you can do transitions for 4.5. But, since Blackberry API the setTransition method from UiEngineInstance class might help you.
EDIT:
It appears I misunderstood the question. Here's another idea: You said you know how to do the transition when you push the screen. Do that when you go back also. You can pop the old screen and then push it again and this way you will be able to handle transitions.

Related

Firebase Screen name issue with modal views in iOS 13 and above

In our app we are tracking screen views manually by adding relevant codes in viewWillAppear functions. With iOS 13, with the non fullscreen modals, the viewWillAppear of the parent screen won't get called when the modal is dismissed and hence wrong screen names are reported there after, for events originating from the parent screen.
I have checked the Detecting sheet was dismissed on iOS 13 , but the solution to implement  UIAdaptivePresentationControllerDelegate helps when you manually swipes down.
I then turned off manual tracking and turned on Automatic tracking and surprisingly the screen classes are determined right. Question is how Firebase is figuring that out?
Of-course I can't use auto tracking as we need custom screen names.
I believe this could be a generic issue for whoever using manual screen name tracking and have non full screen modals. Just wanted to check what's the best way to solve this.
Couple of ideas I had was
Make all modals full screen. Not nice for our app
Implement extra delegates in those modals to let the parent know its dismissed. Not sure its a nice way
Setting screen names on each event? Could that be even possible?
If there are any other nicer/ cleaner option let me know.

How to hide Views from screenshots/screen recordings in SwiftUI

SwiftUI has a SecureField text field which doesn't show anything typed into it when viewed from screen recordings or screenshots. Similarly, iOS 15 is going to have a .privacySensitive() modifier that removes the View from widgets and such. Does anyone have any idea on how to implement Views like this? I want a View which blurs itself when it's contained in screen recordings, screenshots, app widgets, multitasking menu (so they can't cheat the system) etc.
Any suggestions on how to achieve this effect would be greatly appreciated.
Thanks in advance!
Edit: You can tell if someone has opened the multitasking menu by subscribing to NotifcationCenter.default.publisher(for: UIApplication.willResignActive, perform: { _ in }). However I still haven't been able to figure out the others
Edit 2: I also found that subscribing to UIScreen.capturedDidChangeNotification tells you if screen recording is active. Still stuck on screenshots and widgets
I'm not so sure if you can hide screenshots because UIApplication only has a .userDidTakeScreenshotNotification Notification Name. If you are trying to do it manually rather than using iOS 15s .privacySensitive(), you can overlay a View over the entire app. To do this, as you stated you could use the UIApplication.willResignActive to overlay such a view in the Multitasking menu.
To achieve this however you need to get the window and add the subview to it as follows
let currentWindow: UIWindow? = UIApplication.shared.keyWindow
currentWindow?.addSubview(myOverlayView)
For the screenshot problem, like I stated above, Swift only has a .userDidTakeScreenshotNotification and no .userWillTakeScreenshotNotification. So the best bet is to delete the last image by listening to the screenshot notification. You can see how to delete the last photo of the gallery here. This should provide the delete for all feature Whatsapp seems to use. Given that, you will still have to provide access to the gallery
This should give you something similar to the snapchat app. This code is not tested

Instagram pop up feature alike in swift

I was wondering if anyone have any idea how to work out something similar to Instagrams's feature that when you keep pressed a picture in a profile, it pops up until you release the screen. I have been looking around and haven't really found an answer. I was trying to work with popovers but they're not allowed in iphone and most of the alternatives use storyboards. Basically the difference from what im looking for and a popoverpresentation is that I want the new screen to cover most of the screen, not from it to come from the button itself, if that makes sense, while I have the screen pressed. So basically does anybody know how to do this in swift using no storyboards? Thank you!

Swift Multiple Alert Dialog Fade Out my Interface to Black

Goodmorning all,
In some cases I need to present a lot of alert dialog (overlapped on each other). At the moment i can't find another way to do this because i need to take trace of each user's answer for each question in my dialogs.
So, after 5-6 dialog overlapped i've something like this:
my interface is faded out till to black, there is a way to avoide it?
Thanks all in advance.
That happens because the alert has a slight transparent black background which appears on top of the view. The things is since you add a lot of them, at this point this translucent backgrounds they get combined and you get the non-transparent black one.
One alternative would be to not present the alerts all at once but in sequence. So when the first one is dismissed, you present the next one and so on.
Another alternative would be to write your own custom alerts. Then you could control the background as would be fit your application.
However, it does not seem you are using the alerts for what they are supposed to be used, which is errors or messages the user must know. Maybe there is another solution for you application, maybe using a form or something similar. They are quite an intrusive way to interact with an application, so they should be used accordingly.
Hope this helps and you get to figure out the best solution for your project. Good luck!

UI interfaces animation is gone

I am creating an iOS project and are using some of the UI like Alert popup. In the beginning when activating the Alerts it popped up with a smooth animation. But suddenly there is no animations...? Even when I activate a web view it normally scrolled down from the top but now it just is there. Has anyone experinced this, and if yes... How to solve???
Thanks in advance.

Resources