diff --git a/AXWebViewController.xcodeproj/project.pbxproj b/AXWebViewController.xcodeproj/project.pbxproj index f51bffe..d672c84 100644 --- a/AXWebViewController.xcodeproj/project.pbxproj +++ b/AXWebViewController.xcodeproj/project.pbxproj @@ -55,6 +55,8 @@ 0326F0589F0B7F449EE39607 /* Pods-AXWebViewController.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AXWebViewController.release.xcconfig"; path = "Pods/Target Support Files/Pods-AXWebViewController/Pods-AXWebViewController.release.xcconfig"; sourceTree = ""; }; 2642E682614F41BF460E7673 /* libPods-AXWebViewController.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AXWebViewController.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B7311EC599653BFAAF42107 /* Pods-AXWebViewController.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AXWebViewController.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AXWebViewController/Pods-AXWebViewController.debug.xcconfig"; sourceTree = ""; }; + A13CC1551E977227003AC1B2 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = ""; }; + A13CC1561E977227003AC1B2 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = ""; }; DCCF48231E7987C9009CF38E /* Swift.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = Swift.pdf; sourceTree = ""; }; /* End PBXFileReference section */ @@ -196,7 +198,7 @@ TargetAttributes = { 01513BEA1C28F70700CB8238 = { CreatedOnToolsVersion = 7.2; - DevelopmentTeam = TKA48YVS5T; + DevelopmentTeam = E5EPLTYPR9; }; }; }; @@ -307,6 +309,7 @@ children = ( 01513BF81C28F70700CB8238 /* Base */, 013513EA1D60B83D003BDCEA /* zh-Hans */, + A13CC1551E977227003AC1B2 /* zh-Hant */, ); name = Main.storyboard; sourceTree = ""; @@ -316,6 +319,7 @@ children = ( 01513BFD1C28F70700CB8238 /* Base */, 013513EB1D60B83D003BDCEA /* zh-Hans */, + A13CC1561E977227003AC1B2 /* zh-Hant */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -408,7 +412,7 @@ baseConfigurationReference = 3B7311EC599653BFAAF42107 /* Pods-AXWebViewController.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = TKA48YVS5T; + DEVELOPMENT_TEAM = E5EPLTYPR9; INFOPLIST_FILE = AXWebViewController/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -423,7 +427,7 @@ baseConfigurationReference = 0326F0589F0B7F449EE39607 /* Pods-AXWebViewController.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = TKA48YVS5T; + DEVELOPMENT_TEAM = E5EPLTYPR9; INFOPLIST_FILE = AXWebViewController/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.bundle/zh-Hant.lproj/AXWebViewController.strings b/AXWebViewController/AXWebViewController/AXWebViewController.bundle/zh-Hant.lproj/AXWebViewController.strings new file mode 100644 index 0000000..2ec0b1b --- /dev/null +++ b/AXWebViewController/AXWebViewController/AXWebViewController.bundle/zh-Hant.lproj/AXWebViewController.strings @@ -0,0 +1,24 @@ +/* + AXWebViewController.strings + AXWebViewController + + Created by devedbox on 16/8/14. + Copyright © 2016年 AiXing. All rights reserved. +*/ +"back" = "返回"; +"close" = "關閉"; +"loading" = "下載中..."; +"load failed" = "下載失敗"; +"load failed:" = "網頁下載失敗:"; +"web page" = "網頁由"; +"provided" = "提供"; +"browsing the web" = "網頁瀏覽"; + +"messages" = "來自網頁的消息"; +"cancel" = "取消"; +"confirm" = "確定"; +"input" = "輸入文字"; +"terminate" = "網頁結束"; + +"OpenInChrome" = "在Chrome中打開"; +"OpenInSafari" = "在Safari中打開"; diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.h b/AXWebViewController/AXWebViewController/AXWebViewController.h index fad0231..e1482d3 100644 --- a/AXWebViewController/AXWebViewController/AXWebViewController.h +++ b/AXWebViewController/AXWebViewController/AXWebViewController.h @@ -128,6 +128,8 @@ typedef NS_ENUM(NSInteger, AXWebViewControllerNavigationType) { @property(readonly, nonatomic) NSURL *URL; /// Shows tool bar. @property(assign, nonatomic) BOOL showsToolBar; +/// Shows showsBackgroundLabel default YES. +@property(assign, nonatomic) BOOL showsBackgroundLabel; /// Navigation type. @property(assign, nonatomic) AXWebViewControllerNavigationType navigationType; /// Get a instance of `AXWebViewController` by a url string. diff --git a/AXWebViewController/AXWebViewController/AXWebViewController.m b/AXWebViewController/AXWebViewController/AXWebViewController.m index beef102..7747f0e 100644 --- a/AXWebViewController/AXWebViewController/AXWebViewController.m +++ b/AXWebViewController/AXWebViewController/AXWebViewController.m @@ -130,6 +130,7 @@ - (instancetype)initWithURL:(NSURL*)pageURL { _cachePolicy = NSURLRequestReloadRevalidatingCacheData; #endif _showsToolBar = YES; + _showsBackgroundLabel = YES; } return self; } @@ -152,6 +153,8 @@ - (instancetype)initWithHTMLString:(NSString *)HTMLString baseURL:(NSURL *)baseU _cachePolicy = NSURLRequestReloadRevalidatingCacheData; #endif _showsToolBar = YES; + _showsBackgroundLabel = YES; + } return self; } @@ -546,6 +549,7 @@ - (UILabel *)backgroundLabel { _backgroundLabel.backgroundColor = [UIColor clearColor]; _backgroundLabel.translatesAutoresizingMaskIntoConstraints = NO; [_backgroundLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical]; + _backgroundLabel.hidden = !self.showsBackgroundLabel; return _backgroundLabel; } @@ -582,6 +586,7 @@ -(UIPanGestureRecognizer*)swipePanGesture{ return _swipePanGesture; } #endif +#pragma mark - Setter #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0 - (void)setTimeoutInternal:(NSTimeInterval)timeoutInternal { _timeoutInternal = timeoutInternal; @@ -604,6 +609,11 @@ - (void)setShowsToolBar:(BOOL)showsToolBar { [self updateToolbarItems]; } } +- (void)setShowsBackgroundLabel:(BOOL)showsBackgroundLabel{ + _backgroundLabel.hidden = !showsBackgroundLabel; + _showsBackgroundLabel = showsBackgroundLabel; +} + #pragma mark - Public - (void)loadURL:(NSURL *)pageURL { diff --git a/AXWebViewController/TableViewController.m b/AXWebViewController/TableViewController.m index b8d0947..b30f983 100644 --- a/AXWebViewController/TableViewController.m +++ b/AXWebViewController/TableViewController.m @@ -66,6 +66,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath case 3: { AXWebViewController *webVC = [[AXWebViewController alloc] initWithAddress:@"https://github.com/devedbox/AXWebViewController"]; webVC.showsToolBar = NO; + webVC.showsBackgroundLabel = NO; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 webVC.webView.allowsLinkPreview = YES; #endif diff --git a/AXWebViewController/zh-Hant.lproj/LaunchScreen.strings b/AXWebViewController/zh-Hant.lproj/LaunchScreen.strings new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/AXWebViewController/zh-Hant.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/AXWebViewController/zh-Hant.lproj/Main.strings b/AXWebViewController/zh-Hant.lproj/Main.strings new file mode 100644 index 0000000..ffb26a3 --- /dev/null +++ b/AXWebViewController/zh-Hant.lproj/Main.strings @@ -0,0 +1,45 @@ + +/* Class = "UILabel"; text = "Present"; ObjectID = "58i-qo-HOo"; */ +"58i-qo-HOo.text" = "Present"; + +/* Class = "UILabel"; text = "Github pages of AXWebViewController."; ObjectID = "96P-Cp-yAs"; */ +"96P-Cp-yAs.text" = "Github pages of AXWebViewController."; + +/* Class = "UITabBarItem"; title = "Item 1"; ObjectID = "E5r-4X-WNV"; */ +"E5r-4X-WNV.title" = "Item 1"; + +/* Class = "UILabel"; text = "Lastest release pages of AXWebViewController."; ObjectID = "IH4-tk-BHC"; */ +"IH4-tk-BHC.text" = "Lastest release pages of AXWebViewController."; + +/* Class = "UILabel"; text = "File"; ObjectID = "Kda-Lk-aAt"; */ +"Kda-Lk-aAt.text" = "File"; + +/* Class = "UILabel"; text = "push the web view controller in showing file at the bundle."; ObjectID = "LSh-pc-osX"; */ +"LSh-pc-osX.text" = "push the web view controller in showing file at the bundle."; + +/* Class = "UITabBarItem"; title = "Item"; ObjectID = "O96-bZ-DiV"; */ +"O96-bZ-DiV.title" = "Item"; + +/* Class = "UILabel"; text = "Lastest release"; ObjectID = "Zyx-H3-mt5"; */ +"Zyx-H3-mt5.text" = "Lastest release"; + +/* Class = "UILabel"; text = "Github"; ObjectID = "bBD-du-OYx"; */ +"bBD-du-OYx.text" = "Github"; + +/* Class = "UILabel"; text = "push the web view controller in."; ObjectID = "c1w-bj-kxv"; */ +"c1w-bj-kxv.text" = "push the web view controller in."; + +/* Class = "UITabBarItem"; title = "Item"; ObjectID = "fZg-v3-Wbd"; */ +"fZg-v3-Wbd.title" = "Item"; + +/* Class = "UILabel"; text = "Push"; ObjectID = "jPO-kr-MDH"; */ +"jPO-kr-MDH.text" = "Push"; + +/* Class = "UITextField"; placeholder = "Input an address."; ObjectID = "mDR-r7-p1o"; */ +"mDR-r7-p1o.placeholder" = "Input an address."; + +/* Class = "UILabel"; text = "present the web view controller in."; ObjectID = "vDR-sB-qKY"; */ +"vDR-sB-qKY.text" = "present the web view controller in."; + +/* Class = "UITabBarItem"; title = "Item 2"; ObjectID = "zOo-MN-831"; */ +"zOo-MN-831.title" = "Item 2";