Skip to content

Commit

Permalink
Added RTL layout support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Minitour committed Mar 28, 2019
1 parent 4cd7e91 commit e62b274
Show file tree
Hide file tree
Showing 27 changed files with 764 additions and 675 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
2 changes: 1 addition & 1 deletion AZTabBar.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AZTabBar"
s.version = "1.4.0"
s.version = "1.4.1"
s.summary = "A custom tab bar controller for iOS written in Swift 3.0"
s.homepage = "https://github.com/Minitour/AZTabBarController"
s.license = "MIT"
Expand Down
46 changes: 23 additions & 23 deletions AZTabBarController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
4F6140071D883D72005BFB4F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4F6140051D883D72005BFB4F /* LaunchScreen.storyboard */; };
4F6140121D886FE4005BFB4F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6140111D886FE4005BFB4F /* ViewController.swift */; };
4F6140161D895F14005BFB4F /* AZTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F6140141D895F14005BFB4F /* AZTabBarController.swift */; };
9D1BF76B1E9F9521004F8F8C /* SearchController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BF76A1E9F9521004F8F8C /* SearchController.swift */; };
9D1BF76D1E9FC2D4004F8F8C /* ColorSelectorController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D1BF76C1E9FC2D4004F8F8C /* ColorSelectorController.swift */; };
9D8D5F5C1E451CA900038D0D /* blop.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 9D8D5F5B1E451CA900038D0D /* blop.mp3 */; };
9DDDC8051ECE1CC700869009 /* AZTabBarDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DDDC8041ECE1CC700869009 /* AZTabBarDelegate.swift */; };
Expand All @@ -34,8 +33,11 @@
4F6140141D895F14005BFB4F /* AZTabBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AZTabBarController.swift; sourceTree = "<group>"; };
5C1DF6371E2DF3A8BE6120E9 /* Pods_AZTabBarController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AZTabBarController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9433B79E50ED01D596E39D98 /* Pods-AZTabBarController.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AZTabBarController.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AZTabBarController/Pods-AZTabBarController.debug.xcconfig"; sourceTree = "<group>"; };
9D1BF76A1E9F9521004F8F8C /* SearchController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchController.swift; sourceTree = "<group>"; };
9D1BF76C1E9FC2D4004F8F8C /* ColorSelectorController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorSelectorController.swift; sourceTree = "<group>"; };
9D3A10F8224D4F5C00CD11AE /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = "<group>"; };
9D3A10F9224D4F5C00CD11AE /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
9D3A10FA224D4F6400CD11AE /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Main.strings; sourceTree = "<group>"; };
9D3A10FB224D4F6400CD11AE /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
9D8D5F5B1E451CA900038D0D /* blop.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = blop.mp3; sourceTree = "<group>"; };
9DDDC8041ECE1CC700869009 /* AZTabBarDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AZTabBarDelegate.swift; sourceTree = "<group>"; };
9DDDC8061ECE1D1400869009 /* AZTabBarButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AZTabBarButton.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -110,7 +112,6 @@
9D1BF7691E9F9513004F8F8C /* Tabs */ = {
isa = PBXGroup;
children = (
9D1BF76A1E9F9521004F8F8C /* SearchController.swift */,
9D1BF76C1E9FC2D4004F8F8C /* ColorSelectorController.swift */,
);
name = Tabs;
Expand All @@ -137,7 +138,6 @@
4F613FF61D883D72005BFB4F /* Frameworks */,
4F613FF71D883D72005BFB4F /* Resources */,
CC710D6F7D0CDC6E5B699A7F /* [CP] Embed Pods Frameworks */,
EFA7C56E3FB00E82F8ECFED9 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -172,6 +172,8 @@
knownRegions = (
en,
Base,
ar,
he,
);
mainGroup = 4F613FF01D883D72005BFB4F;
productRefGroup = 4F613FFA1D883D72005BFB4F /* Products */;
Expand Down Expand Up @@ -204,13 +206,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-AZTabBarController-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
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;
};
CC710D6F7D0CDC6E5B699A7F /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -219,30 +224,20 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-AZTabBarController/Pods-AZTabBarController-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AZSearchView/AZSearchView.framework",
"${BUILT_PRODUCTS_DIR}/EasyNotificationBadge/EasyNotificationBadge.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AZSearchView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/EasyNotificationBadge.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AZTabBarController/Pods-AZTabBarController-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
EFA7C56E3FB00E82F8ECFED9 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AZTabBarController/Pods-AZTabBarController-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -257,7 +252,6 @@
4F613FFD1D883D72005BFB4F /* AppDelegate.swift in Sources */,
9DDDC8091ECE1D6200869009 /* AZTabBarButtonDelegate.swift in Sources */,
9D1BF76D1E9FC2D4004F8F8C /* ColorSelectorController.swift in Sources */,
9D1BF76B1E9F9521004F8F8C /* SearchController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -268,6 +262,8 @@
isa = PBXVariantGroup;
children = (
4F6140011D883D72005BFB4F /* Base */,
9D3A10F8224D4F5C00CD11AE /* ar */,
9D3A10FA224D4F6400CD11AE /* he */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand All @@ -276,6 +272,8 @@
isa = PBXVariantGroup;
children = (
4F6140061D883D72005BFB4F /* Base */,
9D3A10F9224D4F5C00CD11AE /* ar */,
9D3A10FB224D4F6400CD11AE /* he */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
Expand All @@ -287,6 +285,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -343,6 +342,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -399,7 +399,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.crofis.AZTabBarController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -414,7 +414,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = net.crofis.AZTabBarController;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion AZTabBarController/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
162 changes: 0 additions & 162 deletions AZTabBarController/SearchController.swift

This file was deleted.

7 changes: 3 additions & 4 deletions AZTabBarController/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class ViewController: UIViewController {

var audioId: SystemSoundID!

var searchController: AZSearchViewController!
var resultArray:[String] = []

override func viewDidLoad() {
Expand Down Expand Up @@ -61,7 +60,7 @@ class ViewController: UIViewController {
darkController.navigationBar.barTintColor = #colorLiteral(red: 0.2039215686, green: 0.2862745098, blue: 0.368627451, alpha: 1)


tabController.setViewController(SearchController.instance(), atIndex: 1)
tabController.setViewController(UIViewController(), atIndex: 1)

tabController.setViewController(getNavigationController(root: LabelController.controller(text: "You should really focus on the tab bar.", title: "Chat")), atIndex: 3)

Expand Down Expand Up @@ -116,7 +115,7 @@ class ViewController: UIViewController {

tabController.setIndex(1, animated: true)

tabController.animateTabChange = false
tabController.animateTabChange = true
tabController.onlyShowTextForSelectedButtons = false
tabController.setTitle("Home", atIndex: 0)
tabController.setTitle("Search", atIndex: 1)
Expand Down Expand Up @@ -156,7 +155,7 @@ class ViewController: UIViewController {

func createAudio()->SystemSoundID{
var soundID: SystemSoundID = 0
let soundURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), "blop" as CFString!, "mp3" as CFString!, nil)
let soundURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), "blop" as CFString?, "mp3" as CFString?, nil)
AudioServicesCreateSystemSoundID(soundURL!, &soundID)
return soundID
}
Expand Down
1 change: 1 addition & 0 deletions AZTabBarController/ar.lproj/LaunchScreen.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading

0 comments on commit e62b274

Please sign in to comment.