Coder Social home page Coder Social logo

Comments (7)

dji-lisafedane avatar dji-lisafedane commented on September 26, 2024

Thanks for reporting this - our engineers are looking into this now

from mobile-uxsdk-beta-ios.

dji-lisafedane avatar dji-lisafedane commented on September 26, 2024

@zzz2016 - our engineers have some questions:

  1. What widget are you using?
  2. Are you trying to add the default view to your view controller? If so, you should use install(in:)

from mobile-uxsdk-beta-ios.

zzz2016 avatar zzz2016 commented on September 26, 2024

@zzz2016 - our engineers have some questions:

  1. What widget are you using?
  2. Are you trying to add the default view to your view controller? If so, you should use install(in:)
  1. topBarWidget
  2. I did it, but it doesn't work.

from mobile-uxsdk-beta-ios.

zzz2016 avatar zzz2016 commented on September 26, 2024
public func addRightWidgetArray(_ displayWidgets: [DUXBetaBaseWidget]) {
        self.suspendUpdates = true
        for aWidget in displayWidgets {
            // Build our tracking tuple for each widget so we can associate constraint.
            let isVisible = !(aWidget.view?.isHidden ?? true)   // The true means isHidden since there is no view
            let workTuple : LayoutInfoTuple = (aWidget, isVisible, nil, nil)
            allWidgetVisibilities[BarIndex.rightBarIndex.rawValue].append(workTuple)
            // Add an abserver to the hidden property so we can handle automatic adjustment when a widget disappears or reappears
            aWidget.view?.addObserver(self, forKeyPath: "hidden", options: .new, context: nil)

            addChild(aWidget)

            // And always have all widgets in the bar, even if invisible.
            self.rightBar.addArrangedSubview(aWidget.view)
            aWidget.view.layoutIfNeeded()
        }
        self.suspendUpdates = false
        self.updateUI()
} 

if i insert a line addChild(aWidget), everything will be fine.

from mobile-uxsdk-beta-ios.

dji-lisafedane avatar dji-lisafedane commented on September 26, 2024

@zzz2016 - thanks for your patience and reporting this to us. we are looking into this now

from mobile-uxsdk-beta-ios.

shane-dji avatar shane-dji commented on September 26, 2024

I've been investigating this problem and am unable to reproduce it.
Steps I have tried in our sample app:

  1. Removing the seque to show the DefaultLayoutViewController
  2. Adding a IBAction to on the Default Layout button to perform:
    a) self.showDetailViewController(DefaultLayoutViewController(), sender: self) // This works as stated
    or
    b) self.show(DefaultLayoutViewController(), sender: self) // This causes the widget's viewWillAppear to be called .
  3. I added a viewWillAppear to topBarWidget. It is called when self.show(DefaultLayoutViewController(), sender: self)
  4. I added a logging breakpoint to DUXBetaBatteryWidget which I then instantiated a new copy of and add to the top bar via addLeftWidgetArray([DUXBetaBatteryWidget()])
  5. The viewWillAppear for the battery widget is called successfully.

If you have any more information on which device/simulator this happens on and which version of iOS/Xcode, I would appreciate it.

from mobile-uxsdk-beta-ios.

dji-lisafedane avatar dji-lisafedane commented on September 26, 2024

@zzz2016 - although the engineer could not reproduce the issue, we have found a potential fix to go out in the next release. Please let us know, if you still have issues after that.

from mobile-uxsdk-beta-ios.

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.