Comments (5)
Hi. Thanks for the feedback. Do you have a gif of what you currently have so far so that I can see what is left to do in what you are trying to accomplish?
from rmessage.
Hi, yes here's a youtube video showing what I trying to accomplish: https://youtu.be/JGJNN5VeOdw?t=1623 (start at 27:03 if the link is not working). We are trying to show the native callkit green bar at the top when the app is in foreground - a use case is when there's an on hold ongoing sim call, we would like the user to be able to click on the green bar to go back to the call, which wouldn't show on our app screen if our voip app is making a call at the same time.
a few posts in from the good folks at stack overflow (https://stackoverflow.com/questions/37571066/showing-in-call-status-bar-double-height-for-a-custom-voip-app-in-ios) suggests that using TSMessages is one way to accomplish it, so I shouldn't be the only one looking :)
Cheers!
from rmessage.
As per this in the README:
Want to further customize a notification message right before its presented? Do the following:
let rControl = RMController()
rControl.delegate = self
...
// Now lets implement the RMControllerDelegate customize(message:controller:) method which
// RMController calls right before presenting:
func customize(message: RMessage) {
message.alpha = 0.4
message.addSubview(aView)
}
Set yourself up as a delegate of RMController and then in the callback:
func customize(message: RMessage) {
// Optionally guard message == (the message I'm looking for) so the animations don't happen for all.
// Customize is called before presenting but we can fire off an animation to occur 1s or two after presenting below
DispatchQueue.main.asyncAfter(.now() + timeInSecs) { [weak self]
guard let self = self else { return }
// Your animate code here on the titleLabel + body label of message arg
})
}
Can you try that and see if it works? If not you can modify RMControllerDelegate
to call back with a didPresent method..
from rmessage.
Sorry just started learning iOS and swift, seems like titleLabel is private and I am not sure if there's something obvious I need to do to access it from the message inside func customize(message: RMessage) ?
from rmessage.
@iori57 the titleLabel isn't private for the purposes of setting the text on it. You can go ahead and set the text on it..
from rmessage.
Related Issues (20)
- View controller peeks at the top HOT 6
- blur effect not working in ios 11? HOT 9
- How to add attributedString in the subtitle? HOT 3
- Set icon color in custom designs JSON HOT 5
- RMessagePositionTop displaying not correctly when double height status bar HOT 5
- [Issue] [iPhone X] Notification banner is too short, doesn't extend down far enough to display title. HOT 20
- How to reset all queued messages and the displayed view? HOT 3
- notification showing several times HOT 4
- Display issues in UITableViewController on iOS 10 HOT 14
- Title and Subtitle with Custom Font HOT 10
- Crash HOT 3
- Infinite loop when using automatic presentationViewController detection HOT 3
- Could not load NIB in bundle: NSBundle HOT 1
- Assets are not shown on the default presets HOT 1
- Could not load NIB in bundle: 'NSBundle (loaded)' with name 'RMessageView' HOT 29
- Demo project doesn't compile; downloaded as zip file HOT 2
- May I ask you to add a 2.3.x release of Carthage? HOT 1
- Crashing the app in iOS 13. HOT 3
- Swift 5 compatibility - Apple silicion M1 chip HOT 5
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 rmessage.