2017-10-28 101 views
0

我不能讓pickerview滾動型對watchOS不能獲得滾動視圖我WatchOS

工作

我使用「版本8.3.2(8E2002)」

步工作: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() 
    } 
} 

我的問題是它不WatchOS模擬器滾動

回答

0

你見過這個?:Apple Watch Simulator not Vertically Scrolling

另外,您在文章頂部提到的版本,我認爲它是Xcode?您是否嘗試通過點擊手錶模擬器來使用鼠標或觸控板進行滾動,然後像在Mac上那樣進行滾動?

+0

它的stille不起作用。 –