Tagged both PickerView...Still no luck :(
This commit is contained in:
@@ -204,37 +204,47 @@ class WVMDataSource: UIPickerView, UIPickerViewDelegate, UIPickerViewDataSource
|
|||||||
|
|
||||||
func pickerView(_ v: UIPickerView, numberOfRowsInComponent: Int) -> Int
|
func pickerView(_ v: UIPickerView, numberOfRowsInComponent: Int) -> Int
|
||||||
{
|
{
|
||||||
return wvms.count
|
if v.tag == 2{
|
||||||
|
return ringtones.count
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return wvms.count
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func pickerView(_ v: UIPickerView, titleForRow r: Int, forComponent: Int) -> String?
|
func pickerView(_ v: UIPickerView, titleForRow r: Int, forComponent: Int) -> String?
|
||||||
{
|
{
|
||||||
return wvms[r].name + " - " + wvms[r].desc
|
if v.tag == 2{
|
||||||
|
return ringtones[r].name
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return wvms[r].name + " - " + wvms[r].desc
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RingtonesDataSource: UIPickerView, UIPickerViewDelegate, UIPickerViewDataSource
|
//class RingtonesDataSource: UIPickerView, UIPickerViewDelegate, UIPickerViewDataSource
|
||||||
{
|
//{
|
||||||
required init?(coder: NSCoder)
|
// required init?(coder: NSCoder)
|
||||||
{
|
// {
|
||||||
super.init(coder: coder)
|
// super.init(coder: coder)
|
||||||
delegate = self
|
// delegate = self
|
||||||
dataSource = self
|
// dataSource = self
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
func numberOfComponents(in pickerView: UIPickerView) -> Int
|
// func numberOfComponents(in pickerView: UIPickerView) -> Int
|
||||||
{
|
// {
|
||||||
return 1
|
// return 1
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
func pickerView(_ v: UIPickerView, numberOfRowsInComponent: Int) -> Int
|
// func pickerView(_ v: UIPickerView, numberOfRowsInComponent: Int) -> Int
|
||||||
{
|
// {
|
||||||
return ringtones.count
|
// return ringtones.count
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
func pickerView(_ v: UIPickerView, titleForRow r: Int, forComponent: Int) -> String?
|
// func pickerView(_ v: UIPickerView, titleForRow r: Int, forComponent: Int) -> String?
|
||||||
{
|
// {
|
||||||
return ringtones[r].name
|
// return ringtones[r].name
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -459,7 +459,7 @@
|
|||||||
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="N7f-vi-SFU">
|
<view contentMode="scaleToFill" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="N7f-vi-SFU">
|
||||||
<rect key="frame" x="0.0" y="-15.5" width="374" height="811"/>
|
<rect key="frame" x="0.0" y="-15.5" width="374" height="811"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<datePicker multipleTouchEnabled="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="time" minuteInterval="1" style="wheels" translatesAutoresizingMaskIntoConstraints="NO" id="qSt-1V-2DQ">
|
<datePicker multipleTouchEnabled="YES" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="time" minuteInterval="1" style="wheels" translatesAutoresizingMaskIntoConstraints="NO" id="qSt-1V-2DQ">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="374" height="220"/>
|
<rect key="frame" x="0.0" y="0.0" width="374" height="220"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" constant="220" id="VCm-rY-H4H"/>
|
<constraint firstAttribute="height" constant="220" id="VCm-rY-H4H"/>
|
||||||
@@ -477,7 +477,7 @@
|
|||||||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="bCI-jj-foN">
|
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="bCI-jj-foN">
|
||||||
<rect key="frame" x="0.0" y="258.5" width="374" height="150"/>
|
<rect key="frame" x="0.0" y="258.5" width="374" height="150"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JbI-Jp-vvx">
|
<pickerView tag="2" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JbI-Jp-vvx">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="374" height="150"/>
|
<rect key="frame" x="0.0" y="0.0" width="374" height="150"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" constant="150" id="OgV-hH-xcq"/>
|
<constraint firstAttribute="height" constant="150" id="OgV-hH-xcq"/>
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
<color key="textColor" systemColor="secondaryLabelColor"/>
|
<color key="textColor" systemColor="secondaryLabelColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oae-b2-SoF" customClass="WVMDataSource" customModule="ProjectClock" customModuleProvider="target">
|
<pickerView tag="1" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oae-b2-SoF" customClass="WVMDataSource" customModule="ProjectClock" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="457" width="374" height="150"/>
|
<rect key="frame" x="0.0" y="457" width="374" height="150"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" constant="150" id="C0G-jE-CPx"/>
|
<constraint firstAttribute="height" constant="150" id="C0G-jE-CPx"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user