Skip to content

Commit

Permalink
Merge pull request #19 from justinctlam/localization
Browse files Browse the repository at this point in the history
Support localization strings
  • Loading branch information
themisterholliday authored Oct 16, 2017
2 parents 5000289 + 2c3d0d8 commit fe1888d
Show file tree
Hide file tree
Showing 13 changed files with 307 additions and 43 deletions.
101 changes: 101 additions & 0 deletions Constants/L10nEnum.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen

import Foundation

// swiftlint:disable file_length

// swiftlint:disable explicit_type_interface identifier_name line_length nesting type_body_length type_name
enum L10n {
/// Email Field Empty
static let alertMessageEmailEmpty = L10n.tr("Localizable", "AlertMessageEmailEmpty")
/// Invalid Email Format
static let alertMessageEmailWrongFormat = L10n.tr("Localizable", "AlertMessageEmailWrongFormat")
/// First Name Field Empty
static let alertMessageFirstNameEmpty = L10n.tr("Localizable", "AlertMessageFirstNameEmpty")
/// First Name must be longer than 1 characters
static let alertMessageFirstNameNotLongEnough = L10n.tr("Localizable", "AlertMessageFirstNameNotLongEnough")
/// Issue with User Token
static let alertMessageIssueWithUserToken = L10n.tr("Localizable", "AlertMessageIssueWithUserToken")
/// Last Name Field Empty
static let alertMessageLastNameEmpty = L10n.tr("Localizable", "AlertMessageLastNameEmpty")
/// Last Name must be longer than 1 characters
static let alertMessageLastNameNotLongEnough = L10n.tr("Localizable", "AlertMessageLastNameNotLongEnough")
/// Successfully Logged Out
static let alertMessageLogoutSuccess = L10n.tr("Localizable", "AlertMessageLogoutSuccess")
/// Confirm Password Field Empty
static let alertMessagePasswordConfirmEmpty = L10n.tr("Localizable", "AlertMessagePasswordConfirmEmpty")
/// Password Field Empty
static let alertMessagePasswordEmpty = L10n.tr("Localizable", "AlertMessagePasswordEmpty")
/// Password must be longer than 6 characters
static let alertMessagePasswordNotLongEnough = L10n.tr("Localizable", "AlertMessagePasswordNotLongEnough")
/// Password do not match
static let alertMessagePasswordsDonotMatch = L10n.tr("Localizable", "AlertMessagePasswordsDonotMatch")
/// Please Login
static let alertMessagePleaseLogin = L10n.tr("Localizable", "AlertMessagePleaseLogin")
/// You must login to use this feature.
static let alertMessageYouMustLogin = L10n.tr("Localizable", "AlertMessageYouMustLogin")
/// Cancel
static let cancelButtonTitle = L10n.tr("Localizable", "CancelButtonTitle")
/// Confirm Password
static let confirmPasswordPlaceholder = L10n.tr("Localizable", "ConfirmPasswordPlaceholder")
/// Email
static let emailAddressPlaceholder = L10n.tr("Localizable", "EmailAddressPlaceholder")
/// First Name
static let firstNamePlaceholder = L10n.tr("Localizable", "FirstNamePlaceholder")
/// Error
static let genericError = L10n.tr("Localizable", "GenericError")
/// OK
static let genericOK = L10n.tr("Localizable", "GenericOK")
/// Okay
static let genericOkay = L10n.tr("Localizable", "GenericOkay")
/// Success
static let genericSuccess = L10n.tr("Localizable", "GenericSuccess")
/// Last Name
static let lastNamePlaceholder = L10n.tr("Localizable", "LastNamePlaceholder")
/// Login
static let loginButtonTitle = L10n.tr("Localizable", "LoginButtonTitle")
/// Login
static let loginTitle = L10n.tr("Localizable", "LoginTitle")
/// Logout
static let logoutTitle = L10n.tr("Localizable", "LogoutTitle")
/// Password
static let passwordPlaceholder = L10n.tr("Localizable", "PasswordPlaceholder")
/// Sign Up
static let signUpButtonTitle = L10n.tr("Localizable", "SignUpButtonTitle")
/// Just For You
static let tabBarJustForYou = L10n.tr("Localizable", "TabBarJustForYou")
/// Latest
static let tabBarTitleLatest = L10n.tr("Localizable", "TabBarTitleLatest")
/// All
static let tabTitleAll = L10n.tr("Localizable", "TabTitleAll")
/// Blockchain
static let tabTitleBlockchain = L10n.tr("Localizable", "TabTitleBlockchain")
/// Business and Philosophy
static let tabTitleBusinessAndPhilosophy = L10n.tr("Localizable", "TabTitleBusinessAndPhilosophy")
/// Cloud Engineering
static let tabTitleCloudEngineering = L10n.tr("Localizable", "TabTitleCloudEngineering")
/// Data
static let tabTitleData = L10n.tr("Localizable", "TabTitleData")
/// Greatest Hits
static let tabTitleGreatestHits = L10n.tr("Localizable", "TabTitleGreatestHits")
/// Hackers
static let tabTitleHackers = L10n.tr("Localizable", "TabTitleHackers")
/// JavaScript
static let tabTitleJavaScript = L10n.tr("Localizable", "TabTitleJavaScript")
/// Machine Learning
static let tabTitleMachineLearning = L10n.tr("Localizable", "TabTitleMachineLearning")
/// Open Source
static let tabTitleOpenSource = L10n.tr("Localizable", "TabTitleOpenSource")
/// Security
static let tabTitleSecurity = L10n.tr("Localizable", "TabTitleSecurity")
}
// swiftlint:enable explicit_type_interface identifier_name line_length nesting type_body_length type_name

extension L10n {
fileprivate static func tr(_ table: String, _ key: String, _ args: CVarArg...) -> String {
let format = NSLocalizedString(key, tableName: table, bundle: Bundle(for: BundleToken.self), comment: "")
return String(format: format, locale: Locale.current, arguments: args)
}
}

private final class BundleToken {}
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ target 'SEDaily-IOS' do
pod 'KTResponsiveUI'
pod 'KoalaTeaPlayer'
pod 'Tabman'
pod 'SwiftGen'
pod 'Skeleton'

target 'SEDaily-IOSTests' do
Expand Down
2 changes: 2 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ DEPENDENCIES:
- Skeleton
- SnapKit
- SwifterSwift
- SwiftGen
- SwiftIcons (from `https://github.com/themisterholliday/SwiftIcons.git`, branch `swift-4`)
- SwiftyBeaver
- SwiftyJSON
Expand Down Expand Up @@ -107,6 +108,7 @@ SPEC CHECKSUMS:
SideMenu: 1bf32e90afaa2dc0e0ab68e938a0ff85014c4217
Skeleton: b76249b7d6a73a9913e164c8030647a3e005c700
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
SwiftGen: dd2892e7fb008151f30e6ce0cf465b8b8d89e80e
SwifterSwift: 5f406a5f831343312d6d5b34282b57ef3f52c40b
SwiftIcons: b20641adce6b71fcb2e72389b4b5f2e87252df99
SwiftyBeaver: 91057725648ee4980308f1650af077d04b3654a0
Expand Down
48 changes: 48 additions & 0 deletions SEDaily-IOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
1686FC081F009EC00088A6C1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1686FC071F009EC00088A6C1 /* Assets.xcassets */; };
1686FC0B1F009EC00088A6C1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1686FC091F009EC00088A6C1 /* LaunchScreen.storyboard */; };
1686FC161F009EC00088A6C1 /* SEDaily_IOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1686FC151F009EC00088A6C1 /* SEDaily_IOSTests.swift */; };
169806A61F8EF3970075D8AD /* L10nEnum.swift in Sources */ = {isa = PBXBuildFile; fileRef = 169806A51F8EF08F0075D8AD /* L10nEnum.swift */; };
16B147B11F16BF9C00433A42 /* AudioViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16B147B01F16BF9C00433A42 /* AudioViewManager.swift */; };
16D67C4A1F33AC620065E838 /* AnswersTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D67C491F33AC620065E838 /* AnswersTracker.swift */; };
16D67C4D1F33AE370065E838 /* ObjectExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D67C4C1F33AE370065E838 /* ObjectExtensions.swift */; };
16D766BA1F06B4850066C143 /* AudioView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16D766B91F06B4850066C143 /* AudioView.swift */; };
1E44AF031F87B08D00221B22 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E44AF051F87B08D00221B22 /* Localizable.strings */; };
16FA84031F8D323700A45D9B /* SkeletonCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16FA84021F8D323700A45D9B /* SkeletonCollectionView.swift */; };
238E99F4E37C7365658113B8 /* Pods_SEDaily_IOSTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF0C9F051C6C2F8638D2ABF8 /* Pods_SEDaily_IOSTests.framework */; };
24412438C753126FDDD37CBF /* Pods_SEDaily_IOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3651E5B02B83E392546E167 /* Pods_SEDaily_IOS.framework */; };
Expand Down Expand Up @@ -93,10 +95,15 @@
1686FC111F009EC00088A6C1 /* SEDaily-IOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SEDaily-IOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
1686FC151F009EC00088A6C1 /* SEDaily_IOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SEDaily_IOSTests.swift; sourceTree = "<group>"; };
1686FC171F009EC00088A6C1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
169806A51F8EF08F0075D8AD /* L10nEnum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = L10nEnum.swift; sourceTree = "<group>"; };
16B147B01F16BF9C00433A42 /* AudioViewManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AudioViewManager.swift; sourceTree = "<group>"; };
16D67C491F33AC620065E838 /* AnswersTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnswersTracker.swift; sourceTree = "<group>"; };
16D67C4C1F33AE370065E838 /* ObjectExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectExtensions.swift; sourceTree = "<group>"; };
16D766B91F06B4850066C143 /* AudioView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AudioView.swift; sourceTree = "<group>"; };
1E44AEFF1F87ACF500221B22 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
1E44AF001F87ACF500221B22 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = "<group>"; };
1E44AF061F87B09100221B22 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; };
1E44AF081F87B0A700221B22 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
16FA84021F8D323700A45D9B /* SkeletonCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkeletonCollectionView.swift; sourceTree = "<group>"; };
675FBEB71FD81FBA8767227A /* Pods-SEDaily-IOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SEDaily-IOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-SEDaily-IOS/Pods-SEDaily-IOS.release.xcconfig"; sourceTree = "<group>"; };
995F64385352A79BA0DF7DEB /* Pods-SEDaily-IOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SEDaily-IOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SEDaily-IOSTests/Pods-SEDaily-IOSTests.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -231,11 +238,13 @@
1686FBFF1F009EC00088A6C1 /* SEDaily-IOS */ = {
isa = PBXGroup;
children = (
169806A41F8EF08F0075D8AD /* Constants */,
1610E2C21F227BE0006C8E83 /* Managers */,
1686FC0C1F009EC00088A6C1 /* Info.plist */,
164FE9E41F02EE83009419CA /* API.swift */,
1686FC001F009EC00088A6C1 /* AppDelegate.swift */,
164C71041F021AC8003803BC /* CustomTabViewController.swift */,
1E44AF051F87B08D00221B22 /* Localizable.strings */,
1686FC071F009EC00088A6C1 /* Assets.xcassets */,
164FE9DD1F02DAB8009419CA /* CollectionViewCells */,
164FE9DA1F02DAA5009419CA /* CollectionViews */,
Expand All @@ -262,6 +271,14 @@
path = "SEDaily-IOSTests";
sourceTree = "<group>";
};
169806A41F8EF08F0075D8AD /* Constants */ = {
isa = PBXGroup;
children = (
169806A51F8EF08F0075D8AD /* L10nEnum.swift */,
);
path = Constants;
sourceTree = SOURCE_ROOT;
};
4E74333675FE5899EC260076 /* Pods */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -296,6 +313,7 @@
AE5F616C12D0339AD2CE40F0 /* [CP] Embed Pods Frameworks */,
4B6DBB81C87D23ABC98202EB /* [CP] Copy Pods Resources */,
16D67C4B1F33AD1D0065E838 /* ShellScript */,
169806A21F8EED850075D8AD /* Swiftgen Localize Strings Script */,
);
buildRules = (
);
Expand Down Expand Up @@ -364,6 +382,7 @@
knownRegions = (
en,
Base,
fr,
);
mainGroup = 1686FBF41F009EC00088A6C1;
productRefGroup = 1686FBFE1F009EC00088A6C1 /* Products */;
Expand All @@ -382,6 +401,7 @@
buildActionMask = 2147483647;
files = (
1686FC0B1F009EC00088A6C1 /* LaunchScreen.storyboard in Resources */,
1E44AF031F87B08D00221B22 /* Localizable.strings in Resources */,
1686FC081F009EC00088A6C1 /* Assets.xcassets in Resources */,
1686FC061F009EC00088A6C1 /* Main.storyboard in Resources */,
);
Expand Down Expand Up @@ -415,6 +435,20 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
169806A21F8EED850075D8AD /* Swiftgen Localize Strings Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Swiftgen Localize Strings Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which \"$PODS_ROOT\"/SwiftGen/bin/swiftgen >/dev/null; then\nset -e\n\"$PODS_ROOT\"/SwiftGen/bin/swiftgen strings -t structured-swift3 \"$PROJECT_DIR/SEDaily-IOS/Base.lproj/Localizable.strings\" --output \"$PROJECT_DIR/Constants/L10nEnum.swift\"\nelse\necho \"warning: SwiftGen not installed, download it from https://github.com/SwiftGen/SwiftGen\"\nfi";
};
16D67C4B1F33AD1D0065E838 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -586,6 +620,7 @@
16FA84031F8D323700A45D9B /* SkeletonCollectionView.swift in Sources */,
166036211F266FF300A22B7B /* Notifications.swift in Sources */,
1672FAC41F06C141008445B1 /* NotificationCenterExtension.swift in Sources */,
169806A61F8EF3970075D8AD /* L10nEnum.swift in Sources */,
01BB1D6D1F29999E004A912E /* PodcastPageViewController.swift in Sources */,
164FE9F11F030A2E009419CA /* PodcastModel.swift in Sources */,
164FE9ED1F02F7E2009419CA /* UIButtonExtension.swift in Sources */,
Expand Down Expand Up @@ -618,6 +653,7 @@
isa = PBXVariantGroup;
children = (
1686FC051F009EC00088A6C1 /* Base */,
1E44AF001F87ACF500221B22 /* fr */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand All @@ -626,17 +662,28 @@
isa = PBXVariantGroup;
children = (
1686FC0A1F009EC00088A6C1 /* Base */,
1E44AEFF1F87ACF500221B22 /* fr */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
1E44AF051F87B08D00221B22 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
1E44AF061F87B09100221B22 /* Base */,
1E44AF081F87B0A700221B22 /* fr */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
1686FC181F009EC00088A6C1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down Expand Up @@ -696,6 +743,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
Expand Down
50 changes: 50 additions & 0 deletions SEDaily-IOS/Base.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
Localizable.strings
SEDaily-IOS

Created by Justin Lam on 10/6/17.
Copyright © 2017 Koala Tea. All rights reserved.
*/

/* */
"TabBarTitleLatest" = "Latest";
"TabBarJustForYou" = "Just For You";
"TabTitleAll" = "All";
"TabTitleBusinessAndPhilosophy" = "Business and Philosophy";
"TabTitleBlockchain" = "Blockchain";
"TabTitleCloudEngineering" = "Cloud Engineering";
"TabTitleData" = "Data";
"TabTitleJavaScript" = "JavaScript";
"TabTitleMachineLearning" = "Machine Learning";
"TabTitleOpenSource" = "Open Source";
"TabTitleSecurity" = "Security";
"TabTitleHackers" = "Hackers";
"TabTitleGreatestHits" = "Greatest Hits";
"LoginTitle" = "Login";
"LogoutTitle" = "Logout";
"EmailAddressPlaceholder" = "Email";
"PasswordPlaceholder" = "Password";
"ConfirmPasswordPlaceholder" = "Confirm Password";
"FirstNamePlaceholder" = "First Name";
"LastNamePlaceholder" = "Last Name";
"LoginButtonTitle" = "Login";
"CancelButtonTitle" = "Cancel";
"SignUpButtonTitle" = "Sign Up";
"AlertMessageEmailEmpty" = "Email Field Empty";
"AlertMessagePasswordEmpty" = "Password Field Empty";
"AlertMessagePasswordConfirmEmpty" = "Confirm Password Field Empty";
"AlertMessageEmailWrongFormat" = "Invalid Email Format";
"AlertMessagePasswordNotLongEnough" = "Password must be longer than 6 characters";
"AlertMessagePasswordsDonotMatch" = "Password do not match";
"AlertMessageFirstNameEmpty" = "First Name Field Empty";
"AlertMessageFirstNameNotLongEnough" = "First Name must be longer than 1 characters";
"AlertMessageLastNameEmpty" = "Last Name Field Empty";
"AlertMessageLastNameNotLongEnough" = "Last Name must be longer than 1 characters";
"AlertMessagePleaseLogin" = "Please Login";
"AlertMessageIssueWithUserToken" = "Issue with User Token";
"AlertMessageYouMustLogin" = "You must login to use this feature.";
"AlertMessageLogoutSuccess" = "Successfully Logged Out";
"GenericSuccess" = "Success";
"GenericError" = "Error";
"GenericOkay" = "Okay";
"GenericOK" = "OK";
10 changes: 4 additions & 6 deletions SEDaily-IOS/CustomTabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,11 @@ class CustomTabViewController: UITabBarController, UITabBarControllerDelegate {

switch User.getActiveUser().isLoggedIn() {
case false:
let leftBarButton = UIBarButtonItem(title: "Login", style: .done, target: self, action: #selector(self.loginButtonPressed))
let leftBarButton = UIBarButtonItem(title: L10n.loginTitle, style: .done, target: self, action: #selector(self.loginButtonPressed))
self.navigationItem.leftBarButtonItem = leftBarButton
break
case true:
let leftBarButton = UIBarButtonItem(title: "Logout", style: .done, target: self, action: #selector(self.logoutButtonPressed))
let leftBarButton = UIBarButtonItem(title: L10n.logoutTitle, style: .done, target: self, action: #selector(self.logoutButtonPressed))
self.navigationItem.leftBarButtonItem = leftBarButton
break
}
}

Expand Down Expand Up @@ -99,8 +97,8 @@ class CustomTabViewController: UITabBarController, UITabBarControllerDelegate {
// let vc2 = GeneralCollectionViewController(collectionViewLayout: layout, type: API.Types.recommended)
// let vc3 = GeneralCollectionViewController(collectionViewLayout: layout, type: API.Types.top)

let icon1 = UITabBarItem(title: "Latest", image: #imageLiteral(resourceName: "mic_stand"), selectedImage: #imageLiteral(resourceName: "mic_stand_selected"))
let icon2 = UITabBarItem(title: "Just For You", image: #imageLiteral(resourceName: "activity_feed"), selectedImage: #imageLiteral(resourceName: "activity_feed_selected"))
let icon1 = UITabBarItem(title: L10n.tabBarTitleLatest, image: #imageLiteral(resourceName: "mic_stand"), selectedImage: #imageLiteral(resourceName: "mic_stand_selected"))
let icon2 = UITabBarItem(title: L10n.tabBarJustForYou, image: #imageLiteral(resourceName: "activity_feed"), selectedImage: #imageLiteral(resourceName: "activity_feed_selected"))
let icon3 = UITabBarItem(tabBarSystemItem: .mostViewed, tag: 0)

vc1.tabBarItem = icon1
Expand Down
Loading

0 comments on commit fe1888d

Please sign in to comment.