Reputation: 15
I can't get pickerview scrollview to work on watchOS
I'm using "Version 8.3.2 (8E2002)"
step:1
import WatchKit
import Foundation
class InterfaceController: WKInterfaceController {
@IBOutlet var picker: WKInterfacePicker!
override func awake(withContext context: Any?) {
super.awake(withContext: context)
// Configure interface objects here.
let item1 = WKPickerItem()
item1.title = "1"
let item2 = WKPickerItem()
item2.title = "2"
let item3 = WKPickerItem()
item3.title = "3"
let item4 = WKPickerItem()
item4.title = "4"
let itemsArray = [item1, item2, item3, item4]
picker.setItems(itemsArray)
picker.setEnabled(true)
}
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
}
override func didDeactivate() {
// This method is called when watch view controller is no longer visible
super.didDeactivate()
}
}
My problem is it does not scrolling in WatchOS simulator
Upvotes: 0
Views: 1355
Reputation: 369
Have you seen this?: Apple Watch Simulator not Vertically Scrolling
Also, the version you mention at the top of your post, I assume it is Xcode? Have you tried to use the mouse or trackpad to scroll by clicking on the watch simulator and then scrolling like you would do on the Mac?
Upvotes: 1