Code Monkey home page Code Monkey logo

activityrings's Introduction

Hi, I’m Harshil! 👋🏽

I’m an iOS engineer living in Mumbai, India.

You can follow me on Mastodon and read my blog.

activityrings's People

Contributors

calda avatar harshilshah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

activityrings's Issues

Ring isn't anti-aliased on watchOS

screen shot 2018-10-24 at 8 48 00 am

Rings aren't appearing anti-aliased on watchOS. Are they anti-aliased on iOS?

Is this a bug where the anti-aliasing isn't working on watchOS, or is just the incredibly-small-size making it more obvious that it isn't anti-aliased?

SKShapeNode does have an isAntialiased property, but that's enabled. My hunch is that this has something to do with the custom shader (that generates the gradient?)

Not filled ring is wrong color and displays even after filling up the ring

Hi,

I'm creating a pedometer app that tracks the user's steps. I set the goal to be 5000 and the number of steps the user has walked to be 5543. However, after the ring is filled up, there are two issues (see attached image):

  1. The ring appears as if it's not filled up, and this portion extends a bit past where the "activityRingView.progress" section is.

  2. This not filled section is blue, even though I set the not filled section to be gray.
    How do I fix these two issues?

Screen Shot 2021-07-08 at 7 02 19 PM

pod not installed

pod not installed show me error like this

The platform of the target WPoolMonitor Extension (watchOS 4.0) is not compatible with ActivityRings (1.1.0), which does not support watchos.

Trap or emit warning on unreasonably small `ActivityRingScene` sizes?

When I was experimenting this morning, I typed up this sample class:

class InterfaceController: WKInterfaceController {

    @IBOutlet weak var activityRingInterfaceScene: WKInterfaceSKScene!
    
    var activityRingScene = ActivityRingScene()
    
    override func willActivate() {
        activityRingScene.ringWidth = 15
        activityRingInterfaceScene.presentScene(activityRingScene)
    }
    
    override func didAppear() {
        activityRingScene.progress = 0.75
    }

}

Which looks like this:

screen shot 2018-10-17 at 2 26 17 pm

Took me a while to figure out what the issue was, but it turns out the ActivityRingScene was defaulting to CGSize(width: 1, height: 1). The key to fixing that issue is something like ActivityRingScene(size: contentFrame.size).

I'm wondering if it would be worth trapping or emitting some warning when the ActivityRingScene size is unreasonably small (like 1x1 in that example).

I can't think of a good way to make it automatically have the correct behavior, since we don't have an opportunity to subclass WKInterfaceSKScene.

Unable to reference ActivityRingView

I installed ActivityRings via CocoaPods. My project is a phone app with a watch extension. When I attempt to reference ActivityRingView in the phone app's main view controller, I get the following warning:

screen shot 2018-10-18 at 10 26 33 pm

Edges aren't smooth.

I attached 2 screenshots of my app. If you open them, you can tell that the edges of rings aren't smooth. And it's obvious on real devices. I thought it's because the rings are small (18 * 18 points in Screenshot 1), but even I set the size to 100 * 100 points (in screenshot 2), the issue is still visible to eyeballs on real devices.

I read through the source code, and I think it's a constraint of SpriteKit. But the gif in README.md seems smooth to me (because the gif is compressed?).

Screenshot 1 Screenshot 2
img_5008 simulator screen shot - iphone xs - 2018-12-16 at 17 26 34

Please tell me how to set text in ActivityRings......

I don't know .....
Below, my coding

`var sceneMapping = WKInterfaceSKScene: ActivityRingScene
@IBOutlet var ring: WKInterfaceSKScene!

var label: SKLabelNode!



@IBOutlet var button: WKInterfaceButton!
override func awake(withContext context: Any?) {
    super.awake(withContext: context)
    button.setTitle("リングを動かす")
    label = SKLabelNode()
    
}

override func willActivate() {
    super.willActivate()
    
    sceneMapping[ring]  = ActivityRingScene(size: CGSize(width: 100, height: 100))
    
    label.text = "20:40"
    label.color = UIColor.white
    
    for (interfaceScene, ringScene) in sceneMapping {
        interfaceScene.presentScene(ringScene)
        ringScene.animateProgress(to: 0.75, withDuration: 2.0)
        ringScene.ringWidth = 8
    }
}

override func didDeactivate() {
    super.didDeactivate()
}

//buttonを押した時のメソッド
@IBAction func buttonTapped() {
    print("設定ボタンが押されました")
    for (interfaceScene, ringScene) in sceneMapping {
        interfaceScene.presentScene(ringScene)
        ringScene.animateProgress(to: 0.5, withDuration: 0.5)
        ringScene.ringWidth = 8
    }
    
}`

Please check and tell me................

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.