Questions tagged [wkinterfacebutton]

An instance of the WKInterfaceButton class implements a button on the interface of a iOS Watch application.

A WKInterfaceButton object represents a tappable area on the screen of a iOS Watch application. The content of that area is filled with text and an optional background color or image. When tapped by the user, the button calls its associated action method, which you define on the owning interface controller. Use that action method to initiate tasks and update your app’s interface.

Resources:

13 questions
5
votes
3 answers

How to make a round WKInterfaceButton in watchkit?

iOS can use layer.cornerRadius to make a round UIButton. Does WKInterfaceButton have this property? If not, how can I make a round WKInterfaceButton in WatchKit.
5
votes
2 answers

Does watchOS 2 have API for Force Touch?

As the title, for say I wanna determine if the WKInterfaceButton is clicked normally or by Force Touch. Is it achievable now through watchOS 2?
Jay Hu
  • 6,041
  • 3
  • 22
  • 33
4
votes
1 answer

change button background color on click- WatchKit

Button background is initially white with no background. Need the background to change to the following hex value: #cd9037 @IBOutlet weak var zeroTapped: WKInterfaceButton! @IBAction func ZeroTapped() { zeroTapped.setBackgroundColor(UIColor(red:…
PS1690
  • 85
  • 8
2
votes
1 answer

Make WKInterfaceButton keypress clearer in watchOS 2

I find the graphical feedback when pressing buttons (WKInterfaceButton) in watchOS2 is very weak. It is hard to see and even Apple seems to thinks this is the case as they e.g. in the unlock screen change the background to white on active buttons.…
peterparnes
  • 25
  • 1
  • 4
2
votes
1 answer

how to hide WKInterfaceButton in watchkit

Does anyone know how I can programmatically hide a WKInterfaceButton in watchkit? There doesn't seem to be a setHidden interface like a uibutton.
Atma
  • 29,141
  • 56
  • 198
  • 299
1
vote
0 answers

Watchkit Shape Button

I need a help to make like below buttons to pick colors in Watchkit app. For taking group and i can add the button and set the background image of that but click area of each buttons mismatch the click events. I know how to do in iPhone app but…
Jaimish
  • 629
  • 5
  • 15
1
vote
1 answer

Detect WKInterfaceButton pressed continuously?

WatchKit is here and comes with a very limited code for the programmers. My question: How can I detect if the user is pressing a WKInterfaceButton continuously? Selector ... forControlEvents .. are not supported. Touches begin ... are not…
Kotik_o
  • 295
  • 6
  • 19
1
vote
1 answer

Change WKInterfaceButton background image on tap

I'm trying to change the background image of a WKInterfaceButton in my storyboard when a tap occurs. Also, on calling the setBackgroundImage to change the image, appendValue(1) does not work. class keyPadInterfaceController : WKInterfaceController{ …
PS1690
  • 85
  • 8
0
votes
1 answer

WKInterfaceGroup in table highlights contained button on touch down

I have found if you implement a WKInterfaceTable, the row controller contains a WKInterfaceGroup, and if you add two WKInterfaceButtons to the group, one of which is disabled (or hidden), and you tap down on this button, it will highlight the entire…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
0
votes
1 answer

how to center title text for WKInterfaceButton with iOS WatchKit

I tried this: [myWKButton.titleLabel setTextAlignment: NSTextAlignmentCenter]; I get the error: property titlelabel not found on object of type wkinterfacebutton How can I accomplish this?
Atma
  • 29,141
  • 56
  • 198
  • 299
0
votes
2 answers

WKInterfaceButton multiple line title

How can I show a three to four line title in a WKInterfaceButton? I tried setting the size to fit content but it only shows a maximum of two lines for the title.
Iqbal Khan
  • 4,587
  • 8
  • 44
  • 83
0
votes
1 answer

Can a button contain a group in an Apple Watch app?

I am trying to set an image inside a button (not background image) on Apple Watch. Is there a way you can put a group inside a button? I know we can do it the other way around.
PS1690
  • 85
  • 8
0
votes
2 answers

WKInterfaceButton response time

My Watch app contains a number pad created from WKInterfaceButtons. Quite basic, every button represents digit (0-9) and has an IBAction that updates one WKInterfaceLabel. IBActions don’t contain any heavy work (no web service calls or core data…
sash
  • 8,423
  • 5
  • 63
  • 74