Archived
Made small tweaks to ColourViewCell and the badge for the tab controller
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<rect key="frame" x="0.0" y="0.0" width="437" height="55"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="190-8v-eT2">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="190-8v-eT2">
|
||||
<rect key="frame" x="71" y="8" width="342" height="39"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
|
||||
@@ -67,6 +67,15 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
if let tabItems = self.tabBarController?.tabBar.items {
|
||||
let tabItem = tabItems[1]
|
||||
if self.planPrefs.integer(forKey: "personalPlanCount") != 0 {
|
||||
tabItem.badgeValue = "\(self.planPrefs.integer(forKey: "personalPlanCount"))"
|
||||
} else {
|
||||
tabItem.badgeValue = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getViewType() -> String {
|
||||
|
||||
Reference in New Issue
Block a user