Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Commit

Permalink
Font completed closed #288
Browse files Browse the repository at this point in the history
  • Loading branch information
hamedaakhlaghi committed Aug 3, 2019
1 parent 213082b commit a1e3aeb
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MobileToken/extensions/uilabel/HalfColorLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extension UILabel {
let attributedString = NSMutableAttributedString.init(string: fullText)
for highlightedWord in changeText {
let textRange = (fullText as NSString).range(of: highlightedWord)
attributedString.addAttributes([NSAttributedString.Key.foregroundColor: R.color.secondary()!,NSAttributedString.Key.font: R.font.iranSansMobileFaNumBold(size: 14)!], range: textRange)
attributedString.addAttributes([NSAttributedString.Key.foregroundColor: R.color.secondary()!,NSAttributedString.Key.font: UIHelper.getFont(size: 14)], range: textRange)
}
self.attributedText = attributedString
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class AddPasswordViewDesignable: UIView {
func initUIComponent() {
vBackground.layer.masksToBounds = true
vBackground.layer.cornerRadius = 5
labelAddOtp.font = UIHelper.getFont(size: 14)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class BankCardPagerViewCell: FSPagerViewCell {
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(showOrHidePassword(tapGestureRecognizer:)))
vCard.imageShowPassword.isUserInteractionEnabled = true
vCard.imageShowPassword.addGestureRecognizer(tapGestureRecognizer)
vCard.initUIComponent()
}


Expand Down
8 changes: 7 additions & 1 deletion MobileToken/ui/cardlist/bankcards/CardCellXibView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ class CardCellXibView: UIView {
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
xibSetup()
initUIComponent()

}

func xibSetup() {
contentView = loadViewFromNib()
contentView.frame = bounds
contentView.autoresizingMask = [UIView.AutoresizingMask.flexibleWidth, UIView.AutoresizingMask.flexibleHeight]
addSubview(contentView)
initUIComponent()
}


Expand All @@ -39,6 +40,11 @@ class CardCellXibView: UIView {

func initUIComponent() {
imageLogo.layer.cornerRadius = 10
labelCardNumber.forEach { label in
label.font = UIHelper.getFont(size: 16)
}
labelCardName.font = UIHelper.getFont(size: 14)
labelBankName.font = UIHelper.getFont(size: 16)
}

func loadViewFromNib() -> UIView! {
Expand Down
2 changes: 1 addition & 1 deletion MobileToken/ui/cardlist/bankcards/OtpViewDesignable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class OtpViewDesignable: UIView {
btCopy.layer.masksToBounds = true
btCopy.layer.cornerRadius = 5
vProgress.progressViewStyle = .bar
lbOtp.font = R.font.iranSansMobileFaNum(size: 22)
lbOtp.font = UIHelper.getFont(size: 22)
lbOtp.textColor = .red
let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(self.initCopy))
contentView.addGestureRecognizer(tap)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ class PhoneConfirmationViewController: BaseViewController,PhoneConfirmationViewP
labelChangeNumber.font = UIHelper.iranSansBold(size: 16)
textFieldCode.delegate = self
labelPhone.text = phoneNumber
labelPhone.font = UIHelper.getFont(size: 17)
labelChangeNumber.isUserInteractionEnabled = true
labelEnterCode.font = R.font.iranSansMobile(size: 12)
labelEnterCode.font = UIHelper.getFont(size: 12)
textFieldCode.attributedPlaceholder = NSAttributedString(string: R.string.localizable.ph_activation_code(),
attributes: [NSAttributedString.Key.foregroundColor: R.color.buttonColor()!.withAlphaComponent(0.5)])
labelCounter.font = UIHelper.getFont(size: 16)
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class PhoneInputViewController: UIViewController, BankCollectionViewDelegate,Cou
viewTextfields.layer.backgroundColor = R.color.primaryLight()?.cgColor
viewTextfields.layer.shadowColor = R.color.buttonColor()?.withAlphaComponent(0.25).cgColor
textFieldPhoneNumber.delegate = self
textFieldPhoneNumber.font = UIHelper.getFont(size: 15)
labelPhoneCode.font = UIHelper.getFont(size: 16)
showPhoneInput()
inputMask()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class LockScreenTimeSettingTableViewCell: UITableViewCell {
button.setTitleColor(R.color.buttonColor(), for: .normal)
button.tintColor = .clear
}
labelSecond.font = UIHelper.getFont(size: 16)
collectionButtonsTime.forEach { button in
button.titleLabel?.font = UIHelper.getFont(size: 16)
}
}

func setDelegate(lockScreenTimeProtocol:LockScreenTimeSettingTableViewCellProtocol) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ class SettingAuthenticationDefinitionPasswordViewController: UIViewController,UI
textFieldConfirmPassword.layer.borderWidth = 2
textFieldConfirmPassword.layer.borderColor = R.color.buttonColor()?.withAlphaComponent(0.15).cgColor
textFieldPassword.becomeFirstResponder()
labelPasswordHint.font = R.font.iranSansMobile(size: 12)
labelSecondPassword.font = R.font.iranSansMobile(size: 12)
labelPasswordHint.font = UIHelper.getFont(size: 12)
labelSecondPassword.font = UIHelper.getFont(size: 12)
labelPasswordHint.textColor = R.color.buttonColor()?.withAlphaComponent(0.5)
labelSecondPassword.textColor = R.color.buttonColor()?.withAlphaComponent(0.5)
labelPasswordHint.text = R.string
.localizable.lb_passwordHint()
textFieldPassword.attributedPlaceholder = NSAttributedString(string: R.string.localizable.ph_password(),
attributes: [NSAttributedString.Key.foregroundColor: R.color.buttonColor()!.withAlphaComponent(0.5)])
textFieldConfirmPassword.attributedPlaceholder = NSAttributedString(string:R.string.localizable.ph_confirm_password() ,
Expand Down
2 changes: 1 addition & 1 deletion MobileToken/util/UIHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class UIHelper {
}

static func getFont(size: CGFloat)-> UIFont {
if Locale.preferredLanguages[0] == "ar" {
if Locale.preferredLanguages[0].contains("ar") {
return R.font.iranSansMobileFaNum(size: size)!
} else {
return UIFont.systemFont(ofSize: size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gtq-aV-gt8" userLabel="labelType">
<rect key="frame" x="360" y="28" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" name="IRANSansMobile-Medium" family="IRANSansMobile" pointSize="16"/>
<color key="textColor" red="0.42745098040000001" green="0.42745098040000001" blue="0.42745098040000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lock-reset" translatesAutoresizingMaskIntoConstraints="NO" id="DUg-sn-6jc" userLabel="imageTimer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="seconds" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jBa-RC-JwO" userLabel="labelSeconds">
<rect key="frame" x="294.5" y="18" width="65.5" height="25.5"/>
<fontDescription key="fontDescription" name="IRANSansMobileFaNum" family="IRANSansMobile(FaNum)" pointSize="16"/>
<color key="textColor" name="buttonColor"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@
<action selector="onEndEditing:" destination="uiL-k5-FQr" eventType="editingDidEnd" id="UVb-Op-tNO"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="At least 8 characters." textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fUl-hy-OU6" userLabel="labelPasswordHint">
<rect key="frame" x="30" y="121" width="315" height="19.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="The password must contain at least 8 characters, A number, A capital letter, A character (? * _ = +% $ # @)" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fUl-hy-OU6" userLabel="labelPasswordHint">
<rect key="frame" x="30" y="121" width="315" height="38.5"/>
<fontDescription key="fontDescription" name="IRANSansMobileFaNum" family="IRANSansMobile(FaNum)" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="right" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ZCg-Os-O1H" userLabel="tfConfirmPassword" customClass="PasswordTextField" customModule="PasswordTextField">
<rect key="frame" x="30" y="170.5" width="315" height="40"/>
<rect key="frame" x="30" y="189.5" width="315" height="40"/>
<color key="backgroundColor" name="primary"/>
<color key="tintColor" name="buttonColor"/>
<constraints>
Expand All @@ -127,7 +127,7 @@
<textInputTraits key="textInputTraits" autocorrectionType="no" keyboardAppearance="light" smartDashesType="no" smartInsertDeleteType="no"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enter your password again" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rp7-XY-O6m" userLabel="labelSecondPassword">
<rect key="frame" x="191.5" y="212.5" width="153.5" height="19.5"/>
<rect key="frame" x="191.5" y="231.5" width="153.5" height="19.5"/>
<fontDescription key="fontDescription" name="IRANSansMobileFaNum" family="IRANSansMobile(FaNum)" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
Expand Down

0 comments on commit a1e3aeb

Please sign in to comment.