Code Monkey home page Code Monkey logo

Comments (5)

isadon avatar isadon commented on September 6, 2024

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.

iori57 avatar iori57 commented on September 6, 2024

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.

isadon avatar isadon commented on September 6, 2024

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.

iori57 avatar iori57 commented on September 6, 2024

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.

isadon avatar isadon commented on September 6, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.