diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index bce6f5f..30d1c30 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -257,20 +257,6 @@ 3D8F64C42157791D00F04BD3 /* IfishBaseVc.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64C32157791D00F04BD3 /* IfishBaseVc.m */; }; 3D8F64C72157820700F04BD3 /* IfishHotBarPackegeVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64C62157820700F04BD3 /* IfishHotBarPackegeVo.m */; }; 3D8F64CA2157842200F04BD3 /* IfishPackageHeaderVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64C92157842200F04BD3 /* IfishPackageHeaderVo.m */; }; - 3D8F64EE215797E700F04BD3 /* IQTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64CD215797E600F04BD3 /* IQTextView.m */; }; - 3D8F64EF215797E700F04BD3 /* IQToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64D1215797E600F04BD3 /* IQToolbar.m */; }; - 3D8F64F0215797E700F04BD3 /* IQTitleBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64D3215797E600F04BD3 /* IQTitleBarButtonItem.m */; }; - 3D8F64F1215797E700F04BD3 /* IQBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64D4215797E600F04BD3 /* IQBarButtonItem.m */; }; - 3D8F64F2215797E700F04BD3 /* IQUIView+IQKeyboardToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64D5215797E600F04BD3 /* IQUIView+IQKeyboardToolbar.m */; }; - 3D8F64F3215797E700F04BD3 /* IQPreviousNextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64D6215797E600F04BD3 /* IQPreviousNextView.m */; }; - 3D8F64F4215797E700F04BD3 /* IQKeyboardManager.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 3D8F64DE215797E600F04BD3 /* IQKeyboardManager.bundle */; }; - 3D8F64F5215797E700F04BD3 /* IQKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64E1215797E600F04BD3 /* IQKeyboardManager.m */; }; - 3D8F64F6215797E700F04BD3 /* IQNSArray+Sort.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64E3215797E600F04BD3 /* IQNSArray+Sort.m */; }; - 3D8F64F7215797E700F04BD3 /* IQUITextFieldView+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64E5215797E600F04BD3 /* IQUITextFieldView+Additions.m */; }; - 3D8F64F8215797E700F04BD3 /* IQUIScrollView+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64E6215797E600F04BD3 /* IQUIScrollView+Additions.m */; }; - 3D8F64F9215797E700F04BD3 /* IQUIView+Hierarchy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64E7215797E600F04BD3 /* IQUIView+Hierarchy.m */; }; - 3D8F64FA215797E700F04BD3 /* IQUIViewController+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64EB215797E600F04BD3 /* IQUIViewController+Additions.m */; }; - 3D8F64FB215797E700F04BD3 /* IQKeyboardReturnKeyHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64ED215797E600F04BD3 /* IQKeyboardReturnKeyHandler.m */; }; 3D8F64FE2158874000F04BD3 /* IfishConfigVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F64FD2158874000F04BD3 /* IfishConfigVo.m */; }; 3DD7AB4B21E2F2FB0064856A /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DD7AB2221E2F2FB0064856A /* libzbar.a */; }; 3DD7AB4C21E2F2FB0064856A /* bitstream.c in Sources */ = {isa = PBXBuildFile; fileRef = 3DD7AB3D21E2F2FB0064856A /* bitstream.c */; }; @@ -2266,6 +2252,48 @@ CB0F4E8C22951A130091C76D /* SVIndefiniteAnimatedView.m in Sources */ = {isa = PBXBuildFile; fileRef = CB0F4E8122951A130091C76D /* SVIndefiniteAnimatedView.m */; }; CB0F4E8D22951A130091C76D /* SVProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = CB0F4E8222951A130091C76D /* SVProgressHUD.bundle */; }; CB0F4E8E22951A130091C76D /* SVProgressAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB0F4E8322951A130091C76D /* SVProgressAnimatedView.h */; }; + CB48204423347D4400A50C92 /* ConAquarMethodVC.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48204223347D4400A50C92 /* ConAquarMethodVC.h */; }; + CB48204523347D4400A50C92 /* ConAquarMethodVC.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48204323347D4400A50C92 /* ConAquarMethodVC.m */; }; + CB4820492334B46100A50C92 /* ConAquarNowWiFiPwdVC.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820472334B46100A50C92 /* ConAquarNowWiFiPwdVC.h */; }; + CB48204A2334B46100A50C92 /* ConAquarNowWiFiPwdVC.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820482334B46100A50C92 /* ConAquarNowWiFiPwdVC.m */; }; + CB48204D2334D0A200A50C92 /* ConAquarChooseWiFiVC.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48204B2334D0A200A50C92 /* ConAquarChooseWiFiVC.h */; }; + CB48204E2334D0A200A50C92 /* ConAquarChooseWiFiVC.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48204C2334D0A200A50C92 /* ConAquarChooseWiFiVC.m */; }; + CB4820512334DFCF00A50C92 /* ConnectingAquarVC.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48204F2334DFCF00A50C92 /* ConnectingAquarVC.h */; }; + CB4820522334DFCF00A50C92 /* ConnectingAquarVC.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820502334DFCF00A50C92 /* ConnectingAquarVC.m */; }; + CB4820562334E30300A50C92 /* HKPieChartView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820542334E30300A50C92 /* HKPieChartView.h */; }; + CB4820572334E30300A50C92 /* HKPieChartView.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820552334E30300A50C92 /* HKPieChartView.m */; }; + CB48207B2334E99700A50C92 /* IQTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48205A2334E99700A50C92 /* IQTextView.m */; }; + CB48207C2334E99700A50C92 /* IQTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48205B2334E99700A50C92 /* IQTextView.h */; }; + CB48207D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48205D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h */; }; + CB48207E2334E99700A50C92 /* IQToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48205E2334E99700A50C92 /* IQToolbar.m */; }; + CB48207F2334E99700A50C92 /* IQPreviousNextView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48205F2334E99700A50C92 /* IQPreviousNextView.h */; }; + CB4820802334E99700A50C92 /* IQTitleBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820602334E99700A50C92 /* IQTitleBarButtonItem.m */; }; + CB4820812334E99700A50C92 /* IQBarButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820612334E99700A50C92 /* IQBarButtonItem.m */; }; + CB4820822334E99700A50C92 /* IQUIView+IQKeyboardToolbar.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820622334E99700A50C92 /* IQUIView+IQKeyboardToolbar.m */; }; + CB4820832334E99700A50C92 /* IQPreviousNextView.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820632334E99700A50C92 /* IQPreviousNextView.m */; }; + CB4820842334E99700A50C92 /* IQToolbar.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820642334E99700A50C92 /* IQToolbar.h */; }; + CB4820852334E99700A50C92 /* IQBarButtonItem.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820652334E99700A50C92 /* IQBarButtonItem.h */; }; + CB4820862334E99700A50C92 /* IQTitleBarButtonItem.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820662334E99700A50C92 /* IQTitleBarButtonItem.h */; }; + CB4820872334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820682334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h */; }; + CB4820882334E99700A50C92 /* IQKeyboardManagerConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820692334E99700A50C92 /* IQKeyboardManagerConstants.h */; }; + CB4820892334E99700A50C92 /* IQKeyboardManager.bundle in Resources */ = {isa = PBXBuildFile; fileRef = CB48206B2334E99700A50C92 /* IQKeyboardManager.bundle */; }; + CB48208A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48206C2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h */; }; + CB48208B2334E99700A50C92 /* IQKeyboardManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CB48206D2334E99700A50C92 /* IQKeyboardManager.h */; }; + CB48208C2334E99700A50C92 /* IQKeyboardManager.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48206E2334E99700A50C92 /* IQKeyboardManager.m */; }; + CB48208D2334E99700A50C92 /* IQNSArray+Sort.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820702334E99700A50C92 /* IQNSArray+Sort.m */; }; + CB48208E2334E99700A50C92 /* IQUIViewController+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820712334E99700A50C92 /* IQUIViewController+Additions.h */; }; + CB48208F2334E99700A50C92 /* IQUITextFieldView+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820722334E99700A50C92 /* IQUITextFieldView+Additions.m */; }; + CB4820902334E99700A50C92 /* IQUIScrollView+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820732334E99700A50C92 /* IQUIScrollView+Additions.m */; }; + CB4820912334E99700A50C92 /* IQUIView+Hierarchy.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820742334E99700A50C92 /* IQUIView+Hierarchy.m */; }; + CB4820922334E99700A50C92 /* IQNSArray+Sort.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820752334E99700A50C92 /* IQNSArray+Sort.h */; }; + CB4820932334E99700A50C92 /* IQUIScrollView+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820762334E99700A50C92 /* IQUIScrollView+Additions.h */; }; + CB4820942334E99700A50C92 /* IQUITextFieldView+Additions.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820772334E99700A50C92 /* IQUITextFieldView+Additions.h */; }; + CB4820952334E99700A50C92 /* IQUIViewController+Additions.m in Sources */ = {isa = PBXBuildFile; fileRef = CB4820782334E99700A50C92 /* IQUIViewController+Additions.m */; }; + CB4820962334E99700A50C92 /* IQUIView+Hierarchy.h in Headers */ = {isa = PBXBuildFile; fileRef = CB4820792334E99700A50C92 /* IQUIView+Hierarchy.h */; }; + CB4820972334E99700A50C92 /* IQKeyboardReturnKeyHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = CB48207A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.m */; }; + CB48209A2335CB2200A50C92 /* SDK使用说明 in Resources */ = {isa = PBXBuildFile; fileRef = CB4820982335CB1C00A50C92 /* SDK使用说明 */; }; + CB48209B2335CB2300A50C92 /* GWP2P.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB4820992335CB2200A50C92 /* GWP2P.framework */; }; + CB48209C2335F9D400A50C92 /* GWP2P.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CB4820992335CB2200A50C92 /* GWP2P.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CB484CF122B87D250075F050 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CB7D6AF52296A6FF0014E5C7 /* libresolv.tbd */; }; CB484CF922B8B0AC0075F050 /* GCDAsyncUdpSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = CB484CF522B8B0AC0075F050 /* GCDAsyncUdpSocket.m */; }; CB484CFA22B8B0AC0075F050 /* GCDAsyncSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = CB484CF622B8B0AC0075F050 /* GCDAsyncSocket.m */; }; @@ -2365,9 +2393,6 @@ CB484E4822B8CF9B0075F050 /* AlipaySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3422B8CF9A0075F050 /* AlipaySDK.framework */; }; CB484E4922B8CF9B0075F050 /* SGSecurityBody.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3522B8CF9A0075F050 /* SGSecurityBody.framework */; }; CB484E4A22B8CF9B0075F050 /* OpenMtopExt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3622B8CF9A0075F050 /* OpenMtopExt.framework */; }; - CB52699F22D491D300990E86 /* GWP2P.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB52699D22D491D200990E86 /* GWP2P.framework */; }; - CB5269A022D491D300990E86 /* SDK使用说明 in Resources */ = {isa = PBXBuildFile; fileRef = CB52699E22D491D300990E86 /* SDK使用说明 */; }; - CB5269A122D4A1B500990E86 /* GWP2P.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CB52699D22D491D200990E86 /* GWP2P.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; CB5B9B1922EEC4BC00F0DFB1 /* UIView+Toast.m in Sources */ = {isa = PBXBuildFile; fileRef = CB5B9B1722EEC4BB00F0DFB1 /* UIView+Toast.m */; }; CB5B9B1A22EEC4BC00F0DFB1 /* UIView+Toast.h in Headers */ = {isa = PBXBuildFile; fileRef = CB5B9B1822EEC4BB00F0DFB1 /* UIView+Toast.h */; }; CB7D6AA022953BEB0014E5C7 /* YYDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CB7D6A9822953BEB0014E5C7 /* YYDiskCache.m */; }; @@ -2536,7 +2561,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - CB5269A122D4A1B500990E86 /* GWP2P.framework in Embed Frameworks */, + CB48209C2335F9D400A50C92 /* GWP2P.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -2839,35 +2864,6 @@ 3D8F64C62157820700F04BD3 /* IfishHotBarPackegeVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IfishHotBarPackegeVo.m; sourceTree = ""; }; 3D8F64C82157842200F04BD3 /* IfishPackageHeaderVo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IfishPackageHeaderVo.h; sourceTree = ""; }; 3D8F64C92157842200F04BD3 /* IfishPackageHeaderVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IfishPackageHeaderVo.m; sourceTree = ""; }; - 3D8F64CD215797E600F04BD3 /* IQTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQTextView.m; sourceTree = ""; }; - 3D8F64CE215797E600F04BD3 /* IQTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQTextView.h; sourceTree = ""; }; - 3D8F64D0215797E600F04BD3 /* IQUIView+IQKeyboardToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIView+IQKeyboardToolbar.h"; sourceTree = ""; }; - 3D8F64D1215797E600F04BD3 /* IQToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQToolbar.m; sourceTree = ""; }; - 3D8F64D2215797E600F04BD3 /* IQPreviousNextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQPreviousNextView.h; sourceTree = ""; }; - 3D8F64D3215797E600F04BD3 /* IQTitleBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQTitleBarButtonItem.m; sourceTree = ""; }; - 3D8F64D4215797E600F04BD3 /* IQBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQBarButtonItem.m; sourceTree = ""; }; - 3D8F64D5215797E600F04BD3 /* IQUIView+IQKeyboardToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIView+IQKeyboardToolbar.m"; sourceTree = ""; }; - 3D8F64D6215797E600F04BD3 /* IQPreviousNextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQPreviousNextView.m; sourceTree = ""; }; - 3D8F64D7215797E600F04BD3 /* IQToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQToolbar.h; sourceTree = ""; }; - 3D8F64D8215797E600F04BD3 /* IQBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQBarButtonItem.h; sourceTree = ""; }; - 3D8F64D9215797E600F04BD3 /* IQTitleBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQTitleBarButtonItem.h; sourceTree = ""; }; - 3D8F64DB215797E600F04BD3 /* IQKeyboardManagerConstantsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManagerConstantsInternal.h; sourceTree = ""; }; - 3D8F64DC215797E600F04BD3 /* IQKeyboardManagerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManagerConstants.h; sourceTree = ""; }; - 3D8F64DE215797E600F04BD3 /* IQKeyboardManager.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = IQKeyboardManager.bundle; sourceTree = ""; }; - 3D8F64DF215797E600F04BD3 /* IQKeyboardReturnKeyHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardReturnKeyHandler.h; sourceTree = ""; }; - 3D8F64E0215797E600F04BD3 /* IQKeyboardManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManager.h; sourceTree = ""; }; - 3D8F64E1215797E600F04BD3 /* IQKeyboardManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQKeyboardManager.m; sourceTree = ""; }; - 3D8F64E3215797E600F04BD3 /* IQNSArray+Sort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQNSArray+Sort.m"; sourceTree = ""; }; - 3D8F64E4215797E600F04BD3 /* IQUIViewController+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIViewController+Additions.h"; sourceTree = ""; }; - 3D8F64E5215797E600F04BD3 /* IQUITextFieldView+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUITextFieldView+Additions.m"; sourceTree = ""; }; - 3D8F64E6215797E600F04BD3 /* IQUIScrollView+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIScrollView+Additions.m"; sourceTree = ""; }; - 3D8F64E7215797E600F04BD3 /* IQUIView+Hierarchy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIView+Hierarchy.m"; sourceTree = ""; }; - 3D8F64E8215797E600F04BD3 /* IQNSArray+Sort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQNSArray+Sort.h"; sourceTree = ""; }; - 3D8F64E9215797E600F04BD3 /* IQUIScrollView+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIScrollView+Additions.h"; sourceTree = ""; }; - 3D8F64EA215797E600F04BD3 /* IQUITextFieldView+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUITextFieldView+Additions.h"; sourceTree = ""; }; - 3D8F64EB215797E600F04BD3 /* IQUIViewController+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIViewController+Additions.m"; sourceTree = ""; }; - 3D8F64EC215797E600F04BD3 /* IQUIView+Hierarchy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIView+Hierarchy.h"; sourceTree = ""; }; - 3D8F64ED215797E600F04BD3 /* IQKeyboardReturnKeyHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQKeyboardReturnKeyHandler.m; sourceTree = ""; }; 3D8F64FC2158874000F04BD3 /* IfishConfigVo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IfishConfigVo.h; sourceTree = ""; }; 3D8F64FD2158874000F04BD3 /* IfishConfigVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IfishConfigVo.m; sourceTree = ""; }; 3DD7AB2221E2F2FB0064856A /* libzbar.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libzbar.a; sourceTree = ""; }; @@ -5662,6 +5658,47 @@ CB0F4E8122951A130091C76D /* SVIndefiniteAnimatedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVIndefiniteAnimatedView.m; sourceTree = ""; }; CB0F4E8222951A130091C76D /* SVProgressHUD.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = SVProgressHUD.bundle; sourceTree = ""; }; CB0F4E8322951A130091C76D /* SVProgressAnimatedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVProgressAnimatedView.h; sourceTree = ""; }; + CB48204223347D4400A50C92 /* ConAquarMethodVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConAquarMethodVC.h; sourceTree = ""; }; + CB48204323347D4400A50C92 /* ConAquarMethodVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConAquarMethodVC.m; sourceTree = ""; }; + CB4820472334B46100A50C92 /* ConAquarNowWiFiPwdVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConAquarNowWiFiPwdVC.h; sourceTree = ""; }; + CB4820482334B46100A50C92 /* ConAquarNowWiFiPwdVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConAquarNowWiFiPwdVC.m; sourceTree = ""; }; + CB48204B2334D0A200A50C92 /* ConAquarChooseWiFiVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConAquarChooseWiFiVC.h; sourceTree = ""; }; + CB48204C2334D0A200A50C92 /* ConAquarChooseWiFiVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConAquarChooseWiFiVC.m; sourceTree = ""; }; + CB48204F2334DFCF00A50C92 /* ConnectingAquarVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConnectingAquarVC.h; sourceTree = ""; }; + CB4820502334DFCF00A50C92 /* ConnectingAquarVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ConnectingAquarVC.m; sourceTree = ""; }; + CB4820542334E30300A50C92 /* HKPieChartView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HKPieChartView.h; sourceTree = ""; }; + CB4820552334E30300A50C92 /* HKPieChartView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HKPieChartView.m; sourceTree = ""; }; + CB48205A2334E99700A50C92 /* IQTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQTextView.m; sourceTree = ""; }; + CB48205B2334E99700A50C92 /* IQTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQTextView.h; sourceTree = ""; }; + CB48205D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIView+IQKeyboardToolbar.h"; sourceTree = ""; }; + CB48205E2334E99700A50C92 /* IQToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQToolbar.m; sourceTree = ""; }; + CB48205F2334E99700A50C92 /* IQPreviousNextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQPreviousNextView.h; sourceTree = ""; }; + CB4820602334E99700A50C92 /* IQTitleBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQTitleBarButtonItem.m; sourceTree = ""; }; + CB4820612334E99700A50C92 /* IQBarButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQBarButtonItem.m; sourceTree = ""; }; + CB4820622334E99700A50C92 /* IQUIView+IQKeyboardToolbar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIView+IQKeyboardToolbar.m"; sourceTree = ""; }; + CB4820632334E99700A50C92 /* IQPreviousNextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQPreviousNextView.m; sourceTree = ""; }; + CB4820642334E99700A50C92 /* IQToolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQToolbar.h; sourceTree = ""; }; + CB4820652334E99700A50C92 /* IQBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQBarButtonItem.h; sourceTree = ""; }; + CB4820662334E99700A50C92 /* IQTitleBarButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQTitleBarButtonItem.h; sourceTree = ""; }; + CB4820682334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManagerConstantsInternal.h; sourceTree = ""; }; + CB4820692334E99700A50C92 /* IQKeyboardManagerConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManagerConstants.h; sourceTree = ""; }; + CB48206B2334E99700A50C92 /* IQKeyboardManager.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = IQKeyboardManager.bundle; sourceTree = ""; }; + CB48206C2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardReturnKeyHandler.h; sourceTree = ""; }; + CB48206D2334E99700A50C92 /* IQKeyboardManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IQKeyboardManager.h; sourceTree = ""; }; + CB48206E2334E99700A50C92 /* IQKeyboardManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQKeyboardManager.m; sourceTree = ""; }; + CB4820702334E99700A50C92 /* IQNSArray+Sort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQNSArray+Sort.m"; sourceTree = ""; }; + CB4820712334E99700A50C92 /* IQUIViewController+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIViewController+Additions.h"; sourceTree = ""; }; + CB4820722334E99700A50C92 /* IQUITextFieldView+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUITextFieldView+Additions.m"; sourceTree = ""; }; + CB4820732334E99700A50C92 /* IQUIScrollView+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIScrollView+Additions.m"; sourceTree = ""; }; + CB4820742334E99700A50C92 /* IQUIView+Hierarchy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIView+Hierarchy.m"; sourceTree = ""; }; + CB4820752334E99700A50C92 /* IQNSArray+Sort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQNSArray+Sort.h"; sourceTree = ""; }; + CB4820762334E99700A50C92 /* IQUIScrollView+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIScrollView+Additions.h"; sourceTree = ""; }; + CB4820772334E99700A50C92 /* IQUITextFieldView+Additions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUITextFieldView+Additions.h"; sourceTree = ""; }; + CB4820782334E99700A50C92 /* IQUIViewController+Additions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "IQUIViewController+Additions.m"; sourceTree = ""; }; + CB4820792334E99700A50C92 /* IQUIView+Hierarchy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "IQUIView+Hierarchy.h"; sourceTree = ""; }; + CB48207A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IQKeyboardReturnKeyHandler.m; sourceTree = ""; }; + CB4820982335CB1C00A50C92 /* SDK使用说明 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "SDK使用说明"; sourceTree = ""; }; + CB4820992335CB2200A50C92 /* GWP2P.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GWP2P.framework; sourceTree = ""; }; CB484CEF22B8720D0075F050 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; CB484CF522B8B0AC0075F050 /* GCDAsyncUdpSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDAsyncUdpSocket.m; sourceTree = ""; }; CB484CF622B8B0AC0075F050 /* GCDAsyncSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCDAsyncSocket.m; sourceTree = ""; }; @@ -5761,8 +5798,6 @@ CB484E3422B8CF9A0075F050 /* AlipaySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlipaySDK.framework; sourceTree = ""; }; CB484E3522B8CF9A0075F050 /* SGSecurityBody.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SGSecurityBody.framework; sourceTree = ""; }; CB484E3622B8CF9A0075F050 /* OpenMtopExt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OpenMtopExt.framework; sourceTree = ""; }; - CB52699D22D491D200990E86 /* GWP2P.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GWP2P.framework; sourceTree = ""; }; - CB52699E22D491D300990E86 /* SDK使用说明 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "SDK使用说明"; sourceTree = ""; }; CB5B9B1722EEC4BB00F0DFB1 /* UIView+Toast.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Toast.m"; sourceTree = ""; }; CB5B9B1822EEC4BB00F0DFB1 /* UIView+Toast.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Toast.h"; sourceTree = ""; }; CB7D6A9822953BEB0014E5C7 /* YYDiskCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYDiskCache.m; sourceTree = ""; }; @@ -5970,7 +6005,6 @@ 88C686481EA61217004CDFD9 /* CoreGraphics.framework in Frameworks */, 88C686461EA611F7004CDFD9 /* ImageIO.framework in Frameworks */, 88C686441EA611DC004CDFD9 /* libc++abi.tbd in Frameworks */, - CB52699F22D491D300990E86 /* GWP2P.framework in Frameworks */, 3D1C50B3221A9EDF0096AE43 /* YTheNaviBar.a in Frameworks */, 88C6863C1EA6116C004CDFD9 /* libxml2.tbd in Frameworks */, 88C6863A1EA61149004CDFD9 /* MapKit.framework in Frameworks */, @@ -6000,6 +6034,7 @@ 88C686011EA603A8004CDFD9 /* UShareUI.framework in Frameworks */, 88C685F91EA603A8004CDFD9 /* libSocialWeChat.a in Frameworks */, CB484E4522B8CF9B0075F050 /* UTMini.framework in Frameworks */, + CB48209B2335CB2300A50C92 /* GWP2P.framework in Frameworks */, 3DD7AB4B21E2F2FB0064856A /* libzbar.a in Frameworks */, 88C685F61EA603A8004CDFD9 /* libSocialSina.a in Frameworks */, CB7D6AEC2296A1A40014E5C7 /* CloudPushSDK.framework in Frameworks */, @@ -6535,8 +6570,8 @@ 3D8F649B215751FF00F04BD3 /* Lib */ = { isa = PBXGroup; children = ( + CB4820582334E99700A50C92 /* IQKeyboardManager */, 3D1C171F2171BB0600A159A8 /* PNChart */, - 3D8F64CB215797E600F04BD3 /* IQKeyboardManager */, 3D8F649C2157522100F04BD3 /* MJExtension */, ); path = Lib; @@ -6570,82 +6605,6 @@ path = MJExtension; sourceTree = ""; }; - 3D8F64CB215797E600F04BD3 /* IQKeyboardManager */ = { - isa = PBXGroup; - children = ( - 3D8F64CC215797E600F04BD3 /* IQTextView */, - 3D8F64CF215797E600F04BD3 /* IQToolbar */, - 3D8F64DA215797E600F04BD3 /* Constants */, - 3D8F64DD215797E600F04BD3 /* Resources */, - 3D8F64DF215797E600F04BD3 /* IQKeyboardReturnKeyHandler.h */, - 3D8F64E0215797E600F04BD3 /* IQKeyboardManager.h */, - 3D8F64E1215797E600F04BD3 /* IQKeyboardManager.m */, - 3D8F64E2215797E600F04BD3 /* Categories */, - 3D8F64ED215797E600F04BD3 /* IQKeyboardReturnKeyHandler.m */, - ); - path = IQKeyboardManager; - sourceTree = ""; - }; - 3D8F64CC215797E600F04BD3 /* IQTextView */ = { - isa = PBXGroup; - children = ( - 3D8F64CD215797E600F04BD3 /* IQTextView.m */, - 3D8F64CE215797E600F04BD3 /* IQTextView.h */, - ); - path = IQTextView; - sourceTree = ""; - }; - 3D8F64CF215797E600F04BD3 /* IQToolbar */ = { - isa = PBXGroup; - children = ( - 3D8F64D0215797E600F04BD3 /* IQUIView+IQKeyboardToolbar.h */, - 3D8F64D1215797E600F04BD3 /* IQToolbar.m */, - 3D8F64D2215797E600F04BD3 /* IQPreviousNextView.h */, - 3D8F64D3215797E600F04BD3 /* IQTitleBarButtonItem.m */, - 3D8F64D4215797E600F04BD3 /* IQBarButtonItem.m */, - 3D8F64D5215797E600F04BD3 /* IQUIView+IQKeyboardToolbar.m */, - 3D8F64D6215797E600F04BD3 /* IQPreviousNextView.m */, - 3D8F64D7215797E600F04BD3 /* IQToolbar.h */, - 3D8F64D8215797E600F04BD3 /* IQBarButtonItem.h */, - 3D8F64D9215797E600F04BD3 /* IQTitleBarButtonItem.h */, - ); - path = IQToolbar; - sourceTree = ""; - }; - 3D8F64DA215797E600F04BD3 /* Constants */ = { - isa = PBXGroup; - children = ( - 3D8F64DB215797E600F04BD3 /* IQKeyboardManagerConstantsInternal.h */, - 3D8F64DC215797E600F04BD3 /* IQKeyboardManagerConstants.h */, - ); - path = Constants; - sourceTree = ""; - }; - 3D8F64DD215797E600F04BD3 /* Resources */ = { - isa = PBXGroup; - children = ( - 3D8F64DE215797E600F04BD3 /* IQKeyboardManager.bundle */, - ); - path = Resources; - sourceTree = ""; - }; - 3D8F64E2215797E600F04BD3 /* Categories */ = { - isa = PBXGroup; - children = ( - 3D8F64E3215797E600F04BD3 /* IQNSArray+Sort.m */, - 3D8F64E4215797E600F04BD3 /* IQUIViewController+Additions.h */, - 3D8F64E5215797E600F04BD3 /* IQUITextFieldView+Additions.m */, - 3D8F64E6215797E600F04BD3 /* IQUIScrollView+Additions.m */, - 3D8F64E7215797E600F04BD3 /* IQUIView+Hierarchy.m */, - 3D8F64E8215797E600F04BD3 /* IQNSArray+Sort.h */, - 3D8F64E9215797E600F04BD3 /* IQUIScrollView+Additions.h */, - 3D8F64EA215797E600F04BD3 /* IQUITextFieldView+Additions.h */, - 3D8F64EB215797E600F04BD3 /* IQUIViewController+Additions.m */, - 3D8F64EC215797E600F04BD3 /* IQUIView+Hierarchy.h */, - ); - path = Categories; - sourceTree = ""; - }; 3DD7AB2021E2F2FB0064856A /* ZbarSDK */ = { isa = PBXGroup; children = ( @@ -9168,6 +9127,7 @@ 883E76461D48A5E50030E075 /* controllers */ = { isa = PBXGroup; children = ( + CB4820462334B37100A50C92 /* ConnectAauariumVC */, CBA615F6228E526C00ED380D /* message */, 3D1C4F00221A9EDD0096AE43 /* IfishYooseeFile */, 3D344796212CF49300CF3941 /* HotBar */, @@ -9878,6 +9838,7 @@ 883E79451D48B0280030E075 /* views */ = { isa = PBXGroup; children = ( + CB4820532334E2E800A50C92 /* HKPieChartView */, 887491D31E78CCA000CDA284 /* IifshSegmentView */, 8869B3701E6939FE0010F099 /* NJKWebViewProgress */, 886FB1791E5A89A800256332 /* CustomcamerFile */, @@ -12125,11 +12086,111 @@ path = SVProgressHUD/SVProgressHUD; sourceTree = ""; }; + CB4820462334B37100A50C92 /* ConnectAauariumVC */ = { + isa = PBXGroup; + children = ( + CB48204223347D4400A50C92 /* ConAquarMethodVC.h */, + CB48204323347D4400A50C92 /* ConAquarMethodVC.m */, + CB4820472334B46100A50C92 /* ConAquarNowWiFiPwdVC.h */, + CB4820482334B46100A50C92 /* ConAquarNowWiFiPwdVC.m */, + CB48204B2334D0A200A50C92 /* ConAquarChooseWiFiVC.h */, + CB48204C2334D0A200A50C92 /* ConAquarChooseWiFiVC.m */, + CB48204F2334DFCF00A50C92 /* ConnectingAquarVC.h */, + CB4820502334DFCF00A50C92 /* ConnectingAquarVC.m */, + ); + path = ConnectAauariumVC; + sourceTree = ""; + }; + CB4820532334E2E800A50C92 /* HKPieChartView */ = { + isa = PBXGroup; + children = ( + CB4820542334E30300A50C92 /* HKPieChartView.h */, + CB4820552334E30300A50C92 /* HKPieChartView.m */, + ); + path = HKPieChartView; + sourceTree = ""; + }; + CB4820582334E99700A50C92 /* IQKeyboardManager */ = { + isa = PBXGroup; + children = ( + CB4820592334E99700A50C92 /* IQTextView */, + CB48205C2334E99700A50C92 /* IQToolbar */, + CB4820672334E99700A50C92 /* Constants */, + CB48206A2334E99700A50C92 /* Resources */, + CB48206C2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h */, + CB48206D2334E99700A50C92 /* IQKeyboardManager.h */, + CB48206E2334E99700A50C92 /* IQKeyboardManager.m */, + CB48206F2334E99700A50C92 /* Categories */, + CB48207A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.m */, + ); + path = IQKeyboardManager; + sourceTree = ""; + }; + CB4820592334E99700A50C92 /* IQTextView */ = { + isa = PBXGroup; + children = ( + CB48205A2334E99700A50C92 /* IQTextView.m */, + CB48205B2334E99700A50C92 /* IQTextView.h */, + ); + path = IQTextView; + sourceTree = ""; + }; + CB48205C2334E99700A50C92 /* IQToolbar */ = { + isa = PBXGroup; + children = ( + CB48205D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h */, + CB48205E2334E99700A50C92 /* IQToolbar.m */, + CB48205F2334E99700A50C92 /* IQPreviousNextView.h */, + CB4820602334E99700A50C92 /* IQTitleBarButtonItem.m */, + CB4820612334E99700A50C92 /* IQBarButtonItem.m */, + CB4820622334E99700A50C92 /* IQUIView+IQKeyboardToolbar.m */, + CB4820632334E99700A50C92 /* IQPreviousNextView.m */, + CB4820642334E99700A50C92 /* IQToolbar.h */, + CB4820652334E99700A50C92 /* IQBarButtonItem.h */, + CB4820662334E99700A50C92 /* IQTitleBarButtonItem.h */, + ); + path = IQToolbar; + sourceTree = ""; + }; + CB4820672334E99700A50C92 /* Constants */ = { + isa = PBXGroup; + children = ( + CB4820682334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h */, + CB4820692334E99700A50C92 /* IQKeyboardManagerConstants.h */, + ); + path = Constants; + sourceTree = ""; + }; + CB48206A2334E99700A50C92 /* Resources */ = { + isa = PBXGroup; + children = ( + CB48206B2334E99700A50C92 /* IQKeyboardManager.bundle */, + ); + path = Resources; + sourceTree = ""; + }; + CB48206F2334E99700A50C92 /* Categories */ = { + isa = PBXGroup; + children = ( + CB4820702334E99700A50C92 /* IQNSArray+Sort.m */, + CB4820712334E99700A50C92 /* IQUIViewController+Additions.h */, + CB4820722334E99700A50C92 /* IQUITextFieldView+Additions.m */, + CB4820732334E99700A50C92 /* IQUIScrollView+Additions.m */, + CB4820742334E99700A50C92 /* IQUIView+Hierarchy.m */, + CB4820752334E99700A50C92 /* IQNSArray+Sort.h */, + CB4820762334E99700A50C92 /* IQUIScrollView+Additions.h */, + CB4820772334E99700A50C92 /* IQUITextFieldView+Additions.h */, + CB4820782334E99700A50C92 /* IQUIViewController+Additions.m */, + CB4820792334E99700A50C92 /* IQUIView+Hierarchy.h */, + ); + path = Categories; + sourceTree = ""; + }; CB484CE822B76DEC0075F050 /* GWP2PSDK */ = { isa = PBXGroup; children = ( - CB52699D22D491D200990E86 /* GWP2P.framework */, - CB52699E22D491D300990E86 /* SDK使用说明 */, + CB4820992335CB2200A50C92 /* GWP2P.framework */, + CB4820982335CB1C00A50C92 /* SDK使用说明 */, ); path = GWP2PSDK; sourceTree = ""; @@ -12549,6 +12610,8 @@ 3D1C510C221A9EE00096AE43 /* CameraNoParyBackVideoView.h in Headers */, CB484DEC22B8C8C80075F050 /* crc.h in Headers */, 3D1C50BE221A9EE00096AE43 /* Constants.h in Headers */, + CB4820862334E99700A50C92 /* IQTitleBarButtonItem.h in Headers */, + CB48204423347D4400A50C92 /* ConAquarMethodVC.h in Headers */, CB7D6ABC229660370014E5C7 /* IfishConnectUsViewController.h in Headers */, FA0893012275D9AB0084A609 /* XuanduoSectionHeaderView.h in Headers */, CB484E1622B8C8C90075F050 /* vda.h in Headers */, @@ -12557,14 +12620,17 @@ 3D1C510F221A9EE00096AE43 /* IfishP2PPlayBackListViewController.h in Headers */, CB484E0D22B8C8C80075F050 /* avformat.h in Headers */, CB484E0522B8C8C80075F050 /* pixfmt.h in Headers */, + CB4820492334B46100A50C92 /* ConAquarNowWiFiPwdVC.h in Headers */, 3D1C5116221A9EE00096AE43 /* KTPhotoView+SDWebImage.h in Headers */, 3D1C50BB221A9EE00096AE43 /* RegisterResult.h in Headers */, CBA6167F228F9AB100ED380D /* MASViewConstraint.h in Headers */, CB8B6468230F7F980032EB24 /* IfishMainInfoCell.h in Headers */, CB484E1122B8C8C90075F050 /* version.h in Headers */, 3D1C5122221A9EE00096AE43 /* IfishRecVideoViewCell.h in Headers */, + CB48207C2334E99700A50C92 /* IQTextView.h in Headers */, CB484DFD22B8C8C80075F050 /* old_pix_fmts.h in Headers */, CB484DE822B8C8C80075F050 /* lfg.h in Headers */, + CB4820512334DFCF00A50C92 /* ConnectingAquarVC.h in Headers */, 3D1C5137221A9EE10096AE43 /* ifishdeviceListCell.h in Headers */, 3D1C5085221A9EDF0096AE43 /* KTPhotoBrowserGlobal.h in Headers */, 3D1C50B6221A9EDF0096AE43 /* YSlider.h in Headers */, @@ -12602,6 +12668,7 @@ CB484DE222B8C8C80075F050 /* samplefmt.h in Headers */, 3D1C50AA221A9EDF0096AE43 /* CyclePickerView.h in Headers */, CB484DE322B8C8C80075F050 /* pixdesc.h in Headers */, + CB48204D2334D0A200A50C92 /* ConAquarChooseWiFiVC.h in Headers */, 3D1C50B1221A9EDF0096AE43 /* YMsgBox.h in Headers */, CBA6167D228F9AB100ED380D /* MASViewAttribute.h in Headers */, 3D1C50BD221A9EE00096AE43 /* LoginResult.h in Headers */, @@ -12627,6 +12694,7 @@ 3D1C50C0221A9EE00096AE43 /* Contact.h in Headers */, CB484DF922B8C8C80075F050 /* opt.h in Headers */, FA0892F1226CA3920084A609 /* NSString+Add.h in Headers */, + CB4820852334E99700A50C92 /* IQBarButtonItem.h in Headers */, CB484E0722B8C8C80075F050 /* avassert.h in Headers */, CB484DDE22B8C8C80075F050 /* error.h in Headers */, 3D1C5100221A9EE00096AE43 /* IfishCameraModel.h in Headers */, @@ -12635,12 +12703,14 @@ 3D1C50B4221A9EDF0096AE43 /* YTheNaviBar.h in Headers */, 3D1C5121221A9EE00096AE43 /* CameraBottomCollectionViewCell.h in Headers */, CB484E1222B8C8C90075F050 /* vdpau.h in Headers */, + CB4820962334E99700A50C92 /* IQUIView+Hierarchy.h in Headers */, FA0892E9226B22C90084A609 /* Xuanduo2Model.h in Headers */, 3D1C5115221A9EE00096AE43 /* ShotScreenImgViewController.h in Headers */, 3D1C5083221A9EDF0096AE43 /* KTThumbsViewController.h in Headers */, 3D1C50AF221A9EDF0096AE43 /* YFonc.h in Headers */, CB484E0222B8C8C80075F050 /* mem.h in Headers */, CB484DD922B8C8C80075F050 /* elian.h in Headers */, + CB4820562334E30300A50C92 /* HKPieChartView.h in Headers */, CBA615FC228E8E5A00ED380D /* MyMessageViewController.h in Headers */, CB484E1522B8C8C90075F050 /* avfft.h in Headers */, CB484E0022B8C8C80075F050 /* channel_layout.h in Headers */, @@ -12649,6 +12719,7 @@ CB484DDF22B8C8C80075F050 /* fifo.h in Headers */, 3D1C5124221A9EE00096AE43 /* IfishCameraRecordThirdCell.h in Headers */, CB484DFA22B8C8C80075F050 /* log.h in Headers */, + CB48207F2334E99700A50C92 /* IQPreviousNextView.h in Headers */, FA0893152275F7CF0084A609 /* XuanduoSelectHeader.h in Headers */, 3D1C50D1221A9EE00096AE43 /* SVPullToRefresh.h in Headers */, CB7D6AB022954DE20014E5C7 /* CommonUtils.h in Headers */, @@ -12672,9 +12743,15 @@ 3D1C5109221A9EE00096AE43 /* P2PPlaybackController.h in Headers */, CB484DE422B8C8C80075F050 /* base64.h in Headers */, CB484E1922B8C8C90075F050 /* FfmpegInterface.h in Headers */, + CB4820842334E99700A50C92 /* IQToolbar.h in Headers */, 3D1C50B9221A9EDF0096AE43 /* CheckNewMessageResult.h in Headers */, + CB4820932334E99700A50C92 /* IQUIScrollView+Additions.h in Headers */, + CB48208E2334E99700A50C92 /* IQUIViewController+Additions.h in Headers */, + CB48207D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h in Headers */, + CB48208A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h in Headers */, CBA61678228F9AB100ED380D /* NSArray+MASShorthandAdditions.h in Headers */, 3D1C5095221A9EDF0096AE43 /* Alarm.h in Headers */, + CB4820872334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h in Headers */, 3D1C5145221A9EE10096AE43 /* BootomViewSoketBackMasgConreol.h in Headers */, 3D1C5146221A9EE10096AE43 /* FishTankBootmDataHelper.h in Headers */, CB484DF522B8C8C80075F050 /* hmac.h in Headers */, @@ -12714,6 +12791,8 @@ 3D1C50E0221A9EE00096AE43 /* ShapeRenderNotifyMsg.h in Headers */, 3D1C5125221A9EE00096AE43 /* IfishCameraRecordFourCell.h in Headers */, CB484DEA22B8C8C80075F050 /* intfloat_readwrite.h in Headers */, + CB4820922334E99700A50C92 /* IQNSArray+Sort.h in Headers */, + CB4820942334E99700A50C92 /* IQUITextFieldView+Additions.h in Headers */, 3D1C5139221A9EE10096AE43 /* FishControlSecondCell.h in Headers */, 3D1C50B2221A9EDF0096AE43 /* FounderButton.h in Headers */, 3D1C509F221A9EDF0096AE43 /* YProgressView.h in Headers */, @@ -12724,12 +12803,14 @@ 3D1C50D3221A9EE00096AE43 /* UIScrollView+SVInfiniteScrolling.h in Headers */, CBA61655228F9A6C00ED380D /* YYModel.h in Headers */, CB484DFE22B8C8C80075F050 /* cpu.h in Headers */, + CB4820882334E99700A50C92 /* IQKeyboardManagerConstants.h in Headers */, 3D1C5089221A9EDF0096AE43 /* KTPhotoView.h in Headers */, CB484DFB22B8C8C80075F050 /* aes.h in Headers */, CB484E1022B8C8C90075F050 /* avcodec.h in Headers */, CB0F4E8822951A130091C76D /* SVProgressHUD.h in Headers */, 3D1C511B221A9EE00096AE43 /* ShootImgDataSource.h in Headers */, 3D1C5132221A9EE10096AE43 /* CameraRecordViewController.h in Headers */, + CB48208B2334E99700A50C92 /* IQKeyboardManager.h in Headers */, CB484DF122B8C8C80075F050 /* adler32.h in Headers */, 3D1C50A9221A9EDF0096AE43 /* MXSCycleScrollView.h in Headers */, CB484E0322B8C8C80075F050 /* parseutils.h in Headers */, @@ -13070,6 +13151,7 @@ 882955F61DBDA3A100E9DDD7 /* pumpopen.png in Resources */, 885FBDC51E4C0CB400E0D7D1 /* explore_iocn_authentication@2x.png in Resources */, FAB3721322619DB70051E107 /* Xuanduo2fController.xib in Resources */, + CB4820892334E99700A50C92 /* IQKeyboardManager.bundle in Resources */, 889C14F31EA7397B00470F50 /* personal_iocn_set.png in Resources */, 883E78ED1D48A5E50030E075 /* ConnectWifiViewController.xib in Resources */, 8807074B1DDD40B40076F65A /* P2PShareViewsec2Cell.xib in Resources */, @@ -13354,7 +13436,6 @@ 882956091DBDA3A100E9DDD7 /* neves0012.png in Resources */, 882956B81DBDA3A200E9DDD7 /* scan_left@3x.png in Resources */, 882958171DC04ED200E9DDD7 /* equipment_longpoint.png in Resources */, - CB5269A022D491D300990E86 /* SDK使用说明 in Resources */, 882957431DBDA3A300E9DDD7 /* swimmingfish0050.png in Resources */, 88D3372C1DC71EB5006C0ADB /* linkingdevice_line@2x.png in Resources */, 882956E21DBDA3A300E9DDD7 /* bg2.png in Resources */, @@ -13644,6 +13725,7 @@ 882956AC1DBDA3A200E9DDD7 /* left_camerashop.png in Resources */, 887C36261EE63F6000964ACD /* sortedChnames.plist in Resources */, 882956CE1DBDA3A300E9DDD7 /* ifishnav_dropview_list.png in Resources */, + CB48209A2335CB2200A50C92 /* SDK使用说明 in Resources */, 882956101DBDA3A100E9DDD7 /* neves0019.png in Resources */, 887492391E7A90D000CDA284 /* fishdoctor_iocn_default_twentygold@2x.png in Resources */, 882957291DBDA3A300E9DDD7 /* swimmingfish0024.png in Resources */, @@ -14003,7 +14085,6 @@ 882957381DBDA3A300E9DDD7 /* swimmingfish0039.png in Resources */, 885FBE031E4D5CD200E0D7D1 /* blackbar.png in Resources */, 8871FB031EBC63D30038E99A /* attestation_license.png in Resources */, - 3D8F64F4215797E700F04BD3 /* IQKeyboardManager.bundle in Resources */, 8871C4A61E6D507B000AA49F /* signin_condition_succeed@2x.png in Resources */, 88742C471D645CE70074F1F8 /* shopCertification.html in Resources */, 886D157A1E5FDBAC0085F7D6 /* logo200.png in Resources */, @@ -14212,6 +14293,7 @@ 88140AAC1D86C10D00FE34E5 /* IfishUDPBroadCastHelper.m in Sources */, 3D1C5130221A9EE10096AE43 /* IfishCameraRecordFourCell.m in Sources */, 883E78661D48A5E50030E075 /* ConnectInfoCollectionModel.m in Sources */, + CB48204523347D4400A50C92 /* ConAquarMethodVC.m in Sources */, 8860D78F1D6D7BE8001E544C /* KanHuWorkViewFirstCell.m in Sources */, 88F5EFD91D48D08100CC7CAF /* MyControl.m in Sources */, 3DD7AB4C21E2F2FB0064856A /* bitstream.c in Sources */, @@ -14246,7 +14328,6 @@ 88F5EE531D48CA2800CC7CAF /* ESPUDPSocketClient.m in Sources */, 88602DBE1E10D97E00F3DB5D /* UIImageView+WebCache.m in Sources */, 883E78561D48A5E50030E075 /* IfishBlackListCenterViewController.m in Sources */, - 3D8F64F0215797E700F04BD3 /* IQTitleBarButtonItem.m in Sources */, CB484E1A22B8C8C90075F050 /* RtspInterface.mm in Sources */, 883A3D181EC44EF300DA84FF /* IfishUsersActivityListController.m in Sources */, 883E78EB1D48A5E50030E075 /* ConnectErrorViewController.m in Sources */, @@ -14254,7 +14335,6 @@ 883E79A31D48B0280030E075 /* shopNameCell.m in Sources */, 88F5EFB61D48D08100CC7CAF /* UIImageView+AFNetworking.m in Sources */, 88F5EFD71D48D08100CC7CAF /* MMRadialProgressView.m in Sources */, - 3D8F64F2215797E700F04BD3 /* IQUIView+IQKeyboardToolbar.m in Sources */, 3D8F64B92157522200F04BD3 /* NSString+MJExtension.m in Sources */, 885C43B81E89F79D00685A2E /* WMMenuItem.m in Sources */, 881671DE1EA5DE2B00BEBF23 /* UMComUserProfileDetailView.m in Sources */, @@ -14279,7 +14359,6 @@ 3D1C5094221A9EDF0096AE43 /* ContactDAO.m in Sources */, 883E799F1D48B0280030E075 /* BrandCell.m in Sources */, 883E78471D48A5E50030E075 /* KeLiAiSetViewController.m in Sources */, - 3D8F64F8215797E700F04BD3 /* IQUIScrollView+Additions.m in Sources */, 883E76321D4897570030E075 /* baseModel.m in Sources */, 3D8F64BA2157522200F04BD3 /* MJPropertyKey.m in Sources */, 883E786C1D48A5E50030E075 /* emptyInfoCollectionViewCell.m in Sources */, @@ -14290,13 +14369,13 @@ 88613F721E5C1E86008D2C69 /* P2pShareLiveCommitCell.m in Sources */, 883E78311D48A5E50030E075 /* FatherController.m in Sources */, 883E78831D48A5E50030E075 /* ChangeModelDoneController.m in Sources */, + CB4820802334E99700A50C92 /* IQTitleBarButtonItem.m in Sources */, 881672041EA5DE2B00BEBF23 /* UMComSearchBar.m in Sources */, 3D1C50F9221A9EE00096AE43 /* Message.m in Sources */, 8807074A1DDD40B40076F65A /* P2PShareViewsec2Cell.m in Sources */, 88C1B2BB1DD1745500C2C99A /* NSTimer+Addition.m in Sources */, 885C43B41E89F79D00685A2E /* IfishLiveListViewController.m in Sources */, 88673B071E1F71DC001D5F49 /* SongNuoDBCenterViewController.m in Sources */, - 3D8F64F3215797E700F04BD3 /* IQPreviousNextView.m in Sources */, 883E78421D48A5E50030E075 /* FourControlSetViewController.m in Sources */, 881B123D1E1CCB1A004C074B /* RuSunLightOrder.m in Sources */, 883E787A1D48A5E50030E075 /* ICSDropShadowView.m in Sources */, @@ -14367,9 +14446,10 @@ 881672271EA5DE2B00BEBF23 /* UMComFeedImageCollectionView.m in Sources */, 883E78EC1D48A5E50030E075 /* ConnectWifiViewController.m in Sources */, 3D1C512F221A9EE10096AE43 /* IfishCameraRecordSecondCell.m in Sources */, + CB4820572334E30300A50C92 /* HKPieChartView.m in Sources */, + CB48207E2334E99700A50C92 /* IQToolbar.m in Sources */, 88F5EFC41D48D08100CC7CAF /* JHRefreshAniBaseView.m in Sources */, 88F5EFCE1D48D08100CC7CAF /* MBProgressHUD.m in Sources */, - 3D8F64F9215797E700F04BD3 /* IQUIView+Hierarchy.m in Sources */, 3D1C174D2171BB0700A159A8 /* PNLineChartData.m in Sources */, 3D1C50CB221A9EE00096AE43 /* ModifyLoginPasswordResult.m in Sources */, 88696FD91E9C8C55005D4AFB /* MemberDetailMarkViewCell.m in Sources */, @@ -14489,6 +14569,7 @@ 886B80611D62EC3400E1B9B3 /* TanSuoViewModel.m in Sources */, 3DD7AB4D21E2F2FB0064856A /* qrencode.c in Sources */, 88673B0A1E1F75DF001D5F49 /* SongNuoDBSetViewController.m in Sources */, + CB4820972334E99700A50C92 /* IQKeyboardReturnKeyHandler.m in Sources */, 883E79B71D48B0280030E075 /* MyPickerView.m in Sources */, 883E783F1D48A5E50030E075 /* FourControlViewController.m in Sources */, 883E79B61D48B0280030E075 /* MydatePickerView.m in Sources */, @@ -14536,6 +14617,7 @@ 881671FF1EA5DE2B00BEBF23 /* UMAssetsCollectionOverlayView.m in Sources */, 88613F701E5C1E86008D2C69 /* IfishFeedCellHeaghtCalculator.m in Sources */, 8816722E1EA5DE2B00BEBF23 /* UMComFeedDetailCommentCell.m in Sources */, + CB4820832334E99700A50C92 /* IQPreviousNextView.m in Sources */, 883E78951D48A5E50030E075 /* IfishMessageViewCell.m in Sources */, 887DA78C1D547A49001DB880 /* IfishTanSuoViewCell.m in Sources */, 8816720D1EA5DE2B00BEBF23 /* UMComEmojiPageView.m in Sources */, @@ -14545,6 +14627,7 @@ 8816720F1EA5DE2B00BEBF23 /* UMComWebView.m in Sources */, 88597ABB1E56BAF1003D0E5C /* DrawView.m in Sources */, 881A1D4A1DD41A4900BA1AF4 /* MineKanEditSec1SecondCell.m in Sources */, + CB4820912334E99700A50C92 /* IQUIView+Hierarchy.m in Sources */, 883E76331D4897570030E075 /* appLogin.m in Sources */, 883E76301D4897570030E075 /* UserModel.m in Sources */, 88F5EFC31D48D08100CC7CAF /* JHRefreshAmazingAniView.m in Sources */, @@ -14572,7 +14655,6 @@ 88F5EFD31D48D08100CC7CAF /* MMProgressHUD.m in Sources */, 88779EB21E28BE7D00209ABA /* IfishShopDetailViewController.m in Sources */, 883E78991D48A5E50030E075 /* IfishDeviceViewController.m in Sources */, - 3D8F64F1215797E700F04BD3 /* IQBarButtonItem.m in Sources */, 8853D99A1E24EED700776BF4 /* ShuoMingShuCell.m in Sources */, 8816721A1EA5DE2B00BEBF23 /* UMComCustomMenuViewController.m in Sources */, E5212235210760A600BA24C5 /* SettingResetViewController.m in Sources */, @@ -14592,6 +14674,7 @@ 88F5EFD81D48D08100CC7CAF /* MMVectorImage.m in Sources */, 883E79B81D48B0280030E075 /* remindCyclePic.m in Sources */, 88696FCF1E9C8872005D4AFB /* MemeberEditeViewCustomCell.m in Sources */, + CB48204E2334D0A200A50C92 /* ConAquarChooseWiFiVC.m in Sources */, 881671AA1EA5DE2B00BEBF23 /* UMComDataOperationErrorHandler.m in Sources */, 881671D21EA5DE2B00BEBF23 /* UMComPostReplyEditView.m in Sources */, 88F5EFC71D48D08100CC7CAF /* JHRefreshBaseView.m in Sources */, @@ -14633,7 +14716,7 @@ 883A3D1E1EC45C4900DA84FF /* IFishUserActivityData.m in Sources */, 3D1C50EB221A9EE00096AE43 /* FListManager.m in Sources */, 3D1C5107221A9EE00096AE43 /* IfishP2PPlayBackListViewController.m in Sources */, - 3D8F64F6215797E700F04BD3 /* IQNSArray+Sort.m in Sources */, + CB4820522334DFCF00A50C92 /* ConnectingAquarVC.m in Sources */, 885FBDEE1E4C3E4F00E0D7D1 /* ShopServiceListCell.m in Sources */, 3D1C5142221A9EE10096AE43 /* FishTankBootmDataHelper.m in Sources */, 889C14F81EA73CF200470F50 /* IfishLoadingWebViewController.m in Sources */, @@ -14695,10 +14778,12 @@ 3D1C5136221A9EE10096AE43 /* YooseeCenterViewController.m in Sources */, 8869B3751E6939FE0010F099 /* NJKWebViewProgress.m in Sources */, 881B123A1E1CCA65004C074B /* RuSunHaveHeateViewController.m in Sources */, + CB4820822334E99700A50C92 /* IQUIView+IQKeyboardToolbar.m in Sources */, 886EAC621E2DE91300A4DF27 /* KanHuFirstSectionViewCell.m in Sources */, CBA61686228F9AB100ED380D /* View+MASAdditions.m in Sources */, 881671D61EA5DE2B00BEBF23 /* UMComSysCommentCell.m in Sources */, 885C43B31E89F79D00685A2E /* IfishLiveListViewCell.m in Sources */, + CB4820902334E99700A50C92 /* IQUIScrollView+Additions.m in Sources */, 881671D51EA5DE2B00BEBF23 /* UMComChatRecodTableViewCell.m in Sources */, 883E76241D4897570030E075 /* DropViewModel.m in Sources */, 8891330A1ECE999A00F52EBC /* IfishShopGoodsVideoRecordViewController.m in Sources */, @@ -14712,6 +14797,7 @@ 881672011EA5DE2B00BEBF23 /* UMImagePickerGroupCell.m in Sources */, 88597ABE1E56BAF1003D0E5C /* WFCacheModel.m in Sources */, 887C362B1EE6AD6F00964ACD /* RunSun84CHSetViewController.m in Sources */, + CB48208F2334E99700A50C92 /* IQUITextFieldView+Additions.m in Sources */, 88696FCA1E9C8788005D4AFB /* EditeMemberTitleViewCell.m in Sources */, 881671E51EA5DE2B00BEBF23 /* UMComActionDeleteView.m in Sources */, 886D94D61D6C1BB100CF0B63 /* MineKanHuViewController.m in Sources */, @@ -14787,7 +14873,6 @@ 8867C8761D49B6BC0029F1FA /* TabBarDeviceShouYeCell.m in Sources */, 885979E21E52E38E003D0E5C /* MinekanHuNotSelectShopController.m in Sources */, E58C998A2081A6930004C42B /* RuiMeiBackMsgUtils.m in Sources */, - 3D8F64FA215797E700F04BD3 /* IQUIViewController+Additions.m in Sources */, 88602DB41E10D97E00F3DB5D /* SDWebImageDecoder.m in Sources */, 889133391ECEB97D00F52EBC /* VideoEditeNameViewCell.m in Sources */, 883E76351D4897570030E075 /* BackmassegeModel.m in Sources */, @@ -14803,7 +14888,6 @@ FA0893162275F7CF0084A609 /* XuanduoSelectHeader.m in Sources */, 881671D11EA5DE2B00BEBF23 /* UMComHorizontalTableView.m in Sources */, 8864841F1EE166A40046C3BD /* RuSunChangeNameTextViewCell.m in Sources */, - 3D8F64FB215797E700F04BD3 /* IQKeyboardReturnKeyHandler.m in Sources */, 88779EAB1E28999600209ABA /* JuNengCCSetViewController.m in Sources */, 883E762A1D4897570030E075 /* merchantModel.m in Sources */, 883E78451D48A5E50030E075 /* KeLiAiCenterViewController.m in Sources */, @@ -14832,7 +14916,6 @@ E58C9984208195640004C42B /* RuiMeiViewController.m in Sources */, 881671CD1EA5DE2B00BEBF23 /* UMComLocationTableViewCell.m in Sources */, 88742C331D63F9E80074F1F8 /* CertifyListSecondCell.m in Sources */, - 3D8F64F5215797E700F04BD3 /* IQKeyboardManager.m in Sources */, 3D1C5096221A9EDF0096AE43 /* LocalDevice.m in Sources */, 3D1C5110221A9EE00096AE43 /* PlayBaseViewController.m in Sources */, 88D0F27D1EA6F53E00286022 /* IfishSetViewController.m in Sources */, @@ -14899,6 +14982,7 @@ 883E78EA1D48A5E50030E075 /* BookViewController.m in Sources */, 3D1C17552171BB0700A159A8 /* PNScatterChart.m in Sources */, 883E79AB1D48B0280030E075 /* UIViewController+MaryPopin.m in Sources */, + CB48204A2334B46100A50C92 /* ConAquarNowWiFiPwdVC.m in Sources */, 881671B81EA5DE2B00BEBF23 /* UMComMessageManager.m in Sources */, 3D1C5091221A9EDF0096AE43 /* RegisterResult.m in Sources */, 88597A101E543395003D0E5C /* IfishSHopEdite6ViewCell.m in Sources */, @@ -14936,6 +15020,7 @@ 883E784E1D48A5E50030E075 /* SonNuoCenterViewController.m in Sources */, 883E76261D4897570030E075 /* DeviceCameraModel.m in Sources */, 8875B4FB1EDFA406000FAE93 /* RunSun84Protocol.m in Sources */, + CB48208C2334E99700A50C92 /* IQKeyboardManager.m in Sources */, E58C99872081A3BA0004C42B /* RuiMeiProtocolModel.m in Sources */, CB0F4E8922951A130091C76D /* SVProgressAnimatedView.m in Sources */, 881671C31EA5DE2B00BEBF23 /* UMComViewController.m in Sources */, @@ -14972,6 +15057,7 @@ 883E79AC1D48B0280030E075 /* PlayNDropViewController.m in Sources */, 881671E91EA5DE2B00BEBF23 /* UMComBarButtonItem.m in Sources */, 8861CAF41D59CD520092E5A5 /* IfishNomassageView.m in Sources */, + CB48208D2334E99700A50C92 /* IQNSArray+Sort.m in Sources */, FAA732D5227BE2B80062C252 /* ReadTimerModel.m in Sources */, 8843E2161EEFEC3D00176C65 /* RunSunControlName.m in Sources */, 881671F11EA5DE2B00BEBF23 /* UMImageProgressView.m in Sources */, @@ -14997,7 +15083,6 @@ 88C1B2CD1DD1A58400C2C99A /* IfishKankanListModel.m in Sources */, 889133341ECEB94B00F52EBC /* VideoEditeVideoCell.m in Sources */, 887C16A81ECAC0E000515278 /* ShopGoodsListData.m in Sources */, - 3D8F64EE215797E700F04BD3 /* IQTextView.m in Sources */, 8871FAB91EBC539C0038E99A /* ShopCerSelectImgViewCell.m in Sources */, 8860D7941D6D7C00001E544C /* KanHuWorkViewSecondCell.m in Sources */, FA0892EE226C15000084A609 /* Xuanduo2DataUtility.m in Sources */, @@ -15014,7 +15099,6 @@ 883E79B91D48B0280030E075 /* LYHelper.m in Sources */, 886185CA1EF2290000459AD1 /* FourControlNameViewController.m in Sources */, 881F0F541D73DF680091507E /* BaoGaoViewSecondCell.m in Sources */, - 3D8F64F7215797E700F04BD3 /* IQUITextFieldView+Additions.m in Sources */, 883E78491D48A5E50030E075 /* NoneControlNonetimerViewController.m in Sources */, 880707451DDD3EF50076F65A /* P2PShareView1Cell.m in Sources */, 3D1C50D7221A9EE00096AE43 /* CustomView.m in Sources */, @@ -15043,6 +15127,7 @@ 881671F81EA5DE2B00BEBF23 /* UMComMutiText.m in Sources */, 3D1C50A5221A9EDF0096AE43 /* CyclePickerView.m in Sources */, 883E762B1D4897570030E075 /* setModel.m in Sources */, + CB48207B2334E99700A50C92 /* IQTextView.m in Sources */, 881672151EA5DE2B00BEBF23 /* UMComSimpleCommentEditView.m in Sources */, 8868FE561E66C8BC002F7F33 /* DengJiShuoMingViewTopCell.m in Sources */, 88F5EFB91D48D08100CC7CAF /* UIWebView+AFNetworking.m in Sources */, @@ -15053,6 +15138,7 @@ 883283641EAF224700A47157 /* IfishGoldCoastDetailViewController.m in Sources */, CBA6168B228F9AB100ED380D /* MASViewConstraint.m in Sources */, 3D1C5131221A9EE10096AE43 /* IfishCameraRecordThirdCell.m in Sources */, + CB4820952334E99700A50C92 /* IQUIViewController+Additions.m in Sources */, 881671E81EA5DE2B00BEBF23 /* UMComAddedImageView.m in Sources */, 886FB1B01E5AA02400256332 /* FIshDocsection1TableView2Cell.m in Sources */, 3D1C5103221A9EE00096AE43 /* YooseeNextConnectViewController.mm in Sources */, @@ -15062,6 +15148,7 @@ E5317A1621188F8A0014AFDD /* RestartDeviceModel.m in Sources */, 3D1C5120221A9EE00096AE43 /* CameraBottomHView.m in Sources */, 886EAC5C1E2DC87E00A4DF27 /* IfishShopInfo.m in Sources */, + CB4820812334E99700A50C92 /* IQBarButtonItem.m in Sources */, 3D1C50C8221A9EE00096AE43 /* Alarm.m in Sources */, 881671A61EA5DE2B00BEBF23 /* UMComLocationListDataController.m in Sources */, CB8B6469230F7F980032EB24 /* IfishMainInfoCell.m in Sources */, @@ -15122,7 +15209,6 @@ CB7D6ABD229660370014E5C7 /* IfishConnectUsViewController.m in Sources */, 88F5EFC01D48D08100CC7CAF /* FMDatabasePool.m in Sources */, 883E78641D48A5E50030E075 /* CellModel.m in Sources */, - 3D8F64EF215797E700F04BD3 /* IQToolbar.m in Sources */, 888EEB5E1DC346D3003C5C5B /* FBShimmeringLayer.m in Sources */, 883E78F81D48A5E50030E075 /* ForgetViewController.m in Sources */, 88F5EE4F1D48CA2800CC7CAF /* IPAddress.c in Sources */, diff --git a/Ifish/AppDelegate.m b/Ifish/AppDelegate.m index 9a24300..0db5449 100644 --- a/Ifish/AppDelegate.m +++ b/Ifish/AppDelegate.m @@ -474,7 +474,7 @@ if (kScreenSize.height>480) { self.isGoBack = NO; - + [[NSNotificationCenter defaultCenter] postNotificationName:Noti_WillEnterForeground object:nil]; // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. //后台进 diff --git a/Ifish/Assets.xcassets/.DS_Store b/Ifish/Assets.xcassets/.DS_Store index 483ed93..507938a 100644 Binary files a/Ifish/Assets.xcassets/.DS_Store and b/Ifish/Assets.xcassets/.DS_Store differ diff --git a/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png b/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png index eb19a6e..9135fb5 100644 Binary files a/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png and b/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/Contents.json b/Ifish/Assets.xcassets/热点链接/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/Contents.json new file mode 100644 index 0000000..6333174 --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "bottom_arrow@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/bottom_arrow@3x.png b/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/bottom_arrow@3x.png new file mode 100644 index 0000000..118122d Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/bottom_arrow.imageset/bottom_arrow@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/Contents.json new file mode 100644 index 0000000..4b9ea5c --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icons_con_01@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/icons_con_01@3x.png b/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/icons_con_01@3x.png new file mode 100644 index 0000000..85ac197 Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/icons_con_01.imageset/icons_con_01@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/Contents.json new file mode 100644 index 0000000..52ba8ae --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icons_con_02@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/icons_con_02@3x.png b/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/icons_con_02@3x.png new file mode 100644 index 0000000..306e06f Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/icons_con_02.imageset/icons_con_02@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/Contents.json new file mode 100644 index 0000000..8c2f811 --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icons_con_lock@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/icons_con_lock@3x.png b/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/icons_con_lock@3x.png new file mode 100644 index 0000000..6008ca4 Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/icons_con_lock.imageset/icons_con_lock@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/Contents.json new file mode 100644 index 0000000..4dca93b --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icons_con_topbg@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/icons_con_topbg@3x.png b/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/icons_con_topbg@3x.png new file mode 100644 index 0000000..bb68647 Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/icons_con_topbg.imageset/icons_con_topbg@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/Contents.json new file mode 100644 index 0000000..25907ce --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "icons_con_wifi@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/icons_con_wifi@3x.png b/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/icons_con_wifi@3x.png new file mode 100644 index 0000000..89fd365 Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/icons_con_wifi.imageset/icons_con_wifi@3x.png differ diff --git a/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/Contents.json b/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/Contents.json new file mode 100644 index 0000000..5feb7ee --- /dev/null +++ b/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "right_arrow@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/right_arrow@3x.png b/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/right_arrow@3x.png new file mode 100644 index 0000000..48e5e78 Binary files /dev/null and b/Ifish/Assets.xcassets/热点链接/right_arrow.imageset/right_arrow@3x.png differ diff --git a/Ifish/GWP2PSDK/GWP2P.framework/GWP2P b/Ifish/GWP2PSDK/GWP2P.framework/GWP2P index 6058810..3ac776d 100755 Binary files a/Ifish/GWP2PSDK/GWP2P.framework/GWP2P and b/Ifish/GWP2PSDK/GWP2P.framework/GWP2P differ diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWNet.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWNet.h index 9476500..0bfa60e 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWNet.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWNet.h @@ -104,7 +104,17 @@ extern NSString * const kGWNetSessionIdErrorNotification; withPassword:(NSString*)pwd//密码,需要32位的md5加密处理,如果提供明文密码,内部会自动加密 withAppleToken:(NSString*)token//苹果设备Token,用来远程推送,可空,空时则无法推送 withTimeZone:(NSInteger)timeZone//App用户当前时区,传输格式分钟,例:东八区 480 - completion:(GWNetCompletionBlock)completion;//请求完成回调 + completion:(GWNetCompletionBlock)completion;//请求完成回 +#pragma mark 上传ios推送token +/** + 上传ios推送token,要在token变化或没有上传成功时才调用 + + @param token ios推送token + @param userID 用户ID + @param sessionID 会话ID + @param completion 请求完成回调 + */ +-(void)uploadIosPushToken:(NSString *)token withUserID:(NSString *)userID sessionID:(NSString *)sessionID completion:(GWNetCompletionBlock)completion; #pragma mark 第三方登录 /** @@ -837,6 +847,19 @@ extern NSString * const kGWNetSessionIdErrorNotification; withUserID:(NSString *)userID sessionID:(NSString *)sessionID completion:(GWNetCompletionBlock)completion; +#pragma mark - 检查设备绑定状态V2,用来只设置访客密码,不设管理密码,把id添加切换成分享模式进行统计 +/** + 检查设备绑定状态 + + @param deviceID 设备ID + @param userID 用户(主人)ID + @param sessionID 登陆会话ID + @param completion 绑定完成后的block + */ +- (void)getBindedStatusV2Device:(NSString *)deviceID + withUserID:(NSString *)userID + sessionID:(NSString *)sessionID + completion:(GWNetCompletionBlock)completion; #pragma mark 已联网方式转分享模式 /** diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2P.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2P.h index f685852..d8fc23f 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2P.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2P.h @@ -44,5 +44,7 @@ //服务器加密 #import "MD5Manager.h" +//二维码 +#import "GWQRCodeManager.h" diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Alarm.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Alarm.h index 463ee13..c41acc3 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Alarm.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Alarm.h @@ -118,6 +118,19 @@ typedef enum GWUnbindAlarmAccountOperationType { devicePassword:(NSString *)devicePassword completionBlock:(CompletionBlock)completionBlock; +/** + 设置AI实验室人形侦测开关状态 + 获取AI实验室人形侦测开关状态请调 getMultipledeviceStatusWithDeviceID:password:completionBlock: + @param detectionOn 开关状0关,1开 + @param deviceID 设备ID + @param devicePassword 设备密码 + @param completionBlock 与设备交互完成后的回调Block + */ +- (void)setDeviceAIHumanoidDetectionState:(BOOL)detectionOn + withDeviceID:(NSString *)deviceID + devicePassword:(NSString *)devicePassword + completionBlock:(CompletionBlock)completionBlock; + /** 设置设备红蓝灯开关状态 获取设备红蓝灯开关状态请调 getMultipledeviceStatusWithDeviceID:password:completionBlock: diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Record.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Record.h index 89ce579..d2c8a96 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Record.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+Record.h @@ -251,7 +251,23 @@ typedef enum GWP2PRecordDefinition { devicePassword:(NSString *)devicePassword dayDate:(NSDate *)dayDate completionBlock:(CompletionBlock)completionBlock; +#pragma mark - 获取设备卡回放有有回放文件的列表 +/** + 获取设备卡回放有没有云存储 + + @param deviceID 设备ID + @param devicePassword 设备密码 + @param endDate /从哪一天开始向前查找 + @param days /要查找多少天(包括endDate) + @param completionBlock 与设备交互完成后的回调Block + */ +-(void)getDevcieRecodePlaybackDatesWithDeviceID:(NSString *)deviceID + devicePassword:(NSString *)devicePassword + enddate:(NSDate *)endDate + andSearchDays:(NSInteger )days + completionBlock:(CompletionBlock)completionBlock; +#pragma mark - 设置设备云回放上传的质量 /** 设置设备云回放上传的质量 diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+SceneMode.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+SceneMode.h index c8dbce8..dba9376 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+SceneMode.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient+SceneMode.h @@ -77,8 +77,8 @@ typedef NS_ENUM(uint8_t, GWProtectionSettingState) { */ typedef NS_ENUM(uint8_t, GWProtectionSettingBodyState) { GWProtectionSettingBodyStateNotSurpport = 0, /**< 设备不支持 */ - GWProtectionSettingBodyStateOn = 3, /**< 状态开 */ - GWProtectionSettingBodyStateOnlyBodyOff =7, /**< 状态关 */ + GWProtectionSettingBodyStateOn = 7, /**< 状态开 */ + GWProtectionSettingBodyStateOnlyBodyOff =3, /**< 状态关 */ }; diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient.h index 0f67c30..c12b1e5 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PClient.h @@ -129,9 +129,14 @@ @property (nonatomic, assign) BOOL isAPMode;/**< 是不是AP模式。此属性只保存上次与路由器交互后的数据,调 getDeviceIDInAPMode 方法会重新与路由器交互更新APMode状态,每次app进入前台时会更新APMode状态 */ @property (nonatomic, assign) NSInteger port;/**< 广播端口 */ +@property (nonatomic, strong) NSString* apSSIDPrefix;/**< 自定ap模式wifi前缀如GW_AP_XXXXXXXX,传 GW_AP_ */ +@property (nonatomic, assign) BOOL ackBackPreset;/**< 是否预置位ack回复就返回成功,默认是等转到位置再回复*/ +@property (nonatomic, assign) BOOL supportIPSendCommand;/**< 是否预设备在局域网内用ip发送命令,默认为NO*/ @property (nonatomic, copy) NSString *serverList; /**< P2P服务器列表,自建服务器需要设置此属性,格式"|p2p1.cloudlinks.cn|p2p2.cloudlinks.cn|p2p3.cloud-links.net" */ +@property (nonatomic, copy) NSString *appVersion; + #pragma mark 获取单例 /** * 获取单例 diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDevice.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDevice.h index f15c975..f18cccb 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDevice.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDevice.h @@ -84,6 +84,8 @@ typedef NS_ENUM(NSUInteger, GWP2PDeviceIPCSubtype) { GWP2PDeviceIPCSubtypeSC3035Fisheye360D, //360全景 GWP2PDeviceIPCSubtypeSC3035Fisheye180D = 36, //180全景 + GWP2PDeviceIPCSubtypeHiSi3516EV200 = 37, //HiSI 3516E V200 大镜头变焦变倍设备 + }; diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDeviceLinker.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDeviceLinker.h index 601a7f8..7eae27f 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDeviceLinker.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PDeviceLinker.h @@ -87,7 +87,8 @@ typedef void (^DeviceReceiveBlock)(NSString *deviceId, BOOL isSupport); */ - (void)p2pSmartLinkDeviceWithWiFiSSID:(NSString *)ssid password:(NSString *)password - deviceLinkIn:(DeviceLinkInBlock)deviceLinkInBlock DEPRECATED_ATTRIBUTE; + useSoundWave:(BOOL)useSoundWave + deviceLinkIn:(DeviceLinkInBlock)deviceLinkInBlock; diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlaybackPlayer.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlaybackPlayer.h index f7ac579..8027f5c 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlaybackPlayer.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlaybackPlayer.h @@ -18,6 +18,8 @@ /** 当前播放的文件 */ @property (nonatomic, readonly) GWPlaybackFileModel *playbackFile; +/** 当前播放的文件的时间 */ +@property (nonatomic, assign) uint64_t startTime; /** 当前播放的时间,单位:微秒μs,可监听此时间变化更新播放进度条*/ @property (nonatomic, readonly) uint64_t currentTime; @@ -49,14 +51,37 @@ accept:(P2PAcceptBlock)acceptBlock reject:(P2PRejectBlock)rejectBlock ready:(P2PReadyBlock)readyBlock; - +/** + 播放设备远程录像文件,原理和监控设备是一样的,需要呼叫连接设备 + + @param deviceId 设备ID + @param password 设备密码 + @param playbackFile 回放文件对象,由GWP2PClient+Record中的获取回放文件列表方法获取 + @param callingBlock 正在呼叫回调,详见block定义注释 + @param acceptBlock 接收呼叫回调,详见block定义注释 + @param rejectBlock 拒绝连接回调,详见block定义注释 + @param readyBlock 连接就绪回调,详见block定义注释 + */ +- (void)p2pCallPlaybackFileWithDeviceId:(NSString *)deviceId + password:(NSString *)password + filepts:(unsigned int)pts + playbackFile:(GWPlaybackFileModel *)playbackFile + calling:(P2PCallingBlock)callingBlock + accept:(P2PAcceptBlock)acceptBlock + reject:(P2PRejectBlock)rejectBlock + ready:(P2PReadyBlock)readyBlock; /** 播放远程录像文件,如果已经连接上设备,调用此方法即可快速切换回放文件 @param playbackFile 回放文件对象 */ - (void)p2pPlayPlaybackFile:(GWPlaybackFileModel *)playbackFile; - +/** + 播放远程录像文件,如果已经连接上设备,调用此方法即可快速切换回放文件 + + @param playbackFile 回放文件对象 ,指定播放时间 + */ +- (void)p2pPlayPlaybackFile:(GWPlaybackFileModel *)playbackFile andPts:(NSUInteger)pts ; /** 暂停或者继续播放 @@ -67,7 +92,10 @@ 暂停 */ - (void)p2pPause; - +/** + 播放 + */ +- (void)p2pPlay; /** 快进或者取消快进 */ diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayer.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayer.h index 627ef30..c7bdbd3 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayer.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayer.h @@ -92,8 +92,8 @@ typedef void (^ScreenshotCompletionBlock)(UIImage *screenshot, NSTimeInterval ti /** 是否正在播放, 从call开始就为YES,播放中断置为NO */ @property (nonatomic, assign, readonly) BOOL isPlaying; -/** 无声播放 */ -@property (nonatomic, assign, getter=isSilent) BOOL silent; +/** 麦克风 */ +@property (nonatomic, assign) BOOL micEnable; /** 静音, 当`silent=YES`时`mute=YES` */ @property (nonatomic, assign, getter=isMute) BOOL mute; @@ -109,7 +109,8 @@ typedef void (^ScreenshotCompletionBlock)(UIImage *screenshot, NSTimeInterval ti /** 当前全景视频pts,转化成时间戳(秒)=pts/(1000*1000) */ @property (nonatomic, assign, readonly) uint64_t panoPTS; - +/** 刷新*/ +@property (nonatomic, assign) BOOL panoPause; /** 构造方法 diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayerDefine.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayerDefine.h index d5879a6..78f3ac9 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayerDefine.h +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWP2PPlayerDefine.h @@ -139,7 +139,7 @@ typedef NS_ENUM(NSUInteger, GWP2PPTZDirection) { /** 视频清晰度 */ -typedef NS_ENUM(NSUInteger, GWP2PPTZDefinition) { +typedef NS_ENUM(NSInteger, GWP2PPTZDefinition) { GWP2PPTZDefinitionLD = 0, //流畅,NPC:320*240 IPC:320*180 GWP2PPTZDefinitionSD, //标清,NPC:640*480 IPC:640*360 GWP2PPTZDefinitionHD, //高清,NPC:None IPC:1280*720 diff --git a/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWQRCodeManager.h b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWQRCodeManager.h new file mode 100755 index 0000000..6178b8c --- /dev/null +++ b/Ifish/GWP2PSDK/GWP2P.framework/Headers/GWQRCodeManager.h @@ -0,0 +1,88 @@ +// +// GWQRCodeManager.h +// Yoosee +// +// Created by HuangZhen on 2018/5/28. +// Copyright © 2018年 Gwelltimes. All rights reserved. +// + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + 扫码结果回调 + + @param scanResult 原始字符串 + @param deviceID 设备ID + @param qrNetCfgAvailable 设备是否支持扫码配网 + */ +typedef void(^GWQRCodeScanCallback)(NSString * _Nullable scanResult, NSString * _Nullable deviceID, BOOL qrNetCfgAvailable); + +@interface GWQRCodeManager : NSObject + +/** + 初始化二维码扫码 + 需要手动调用startScan开启扫码 + @param preView 视频显示区域 + @param cropRect 识别区域,值为CGRectZero时全屏识别 + @param callback 识别完成回调 + @return GWQRCodeManager实例 + */ +- (instancetype)initWithPreView:(UIView*)preView cropRect:(CGRect)cropRect callback:(GWQRCodeScanCallback)callback; + +/** + 初始化并开启二维码扫码 + + @param preView 视频显示区域 + @param cropRect 识别区域,值为CGRectZero时全屏识别 + @param callback 识别完成回调 + @return GWQRCodeManager实例 + */ ++ (instancetype)startScanWithPreView:(UIView*)preView cropRect:(CGRect)cropRect callback:(GWQRCodeScanCallback)callback; + + +/** + 闪光灯模式 + */ +@property (nonatomic, assign) AVCaptureTorchMode torchMode; + + +/** + 开始扫码 + */ +- (void)startScan; + + +/** + 停止扫码 + */ +- (void)stopScan; + + +/** + 生成二维码 + + @param wifiName Wi-Fi名称 + @param wifiPwd Wi-Fi密码 + @param userID 有看头ID + @param size 二维码尺寸 + + @return 二维码图片, 失败时为nil + */ ++ (nullable UIImage *)createQRCodeWithWifiName:(NSString *)wifiName wifiPwd:(NSString *)wifiPwd userID:(NSString *)userID qrSize:(CGSize)size; + + +/** + 生成二维码 + + @param qrString 要生成二维码的字符串 + @param size 二维码尺寸 + @return 二维码图片, 失败时为nil + */ ++ (nullable UIImage *)createQRCodeWithString:(NSString *)qrString qrSize:(CGSize)size; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/GWP2PSDK/GWP2P.framework/_CodeSignature/CodeResources b/Ifish/GWP2PSDK/GWP2P.framework/_CodeSignature/CodeResources index a277d9a..9a774b5 100755 --- a/Ifish/GWP2PSDK/GWP2P.framework/_CodeSignature/CodeResources +++ b/Ifish/GWP2PSDK/GWP2P.framework/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Headers/GWNet.h - /D/h3V7xJHk/BcZAej7Qdp1XAW8= + qOvnF0hkPDvokoux41oP8C9VOR0= Headers/GWNetError.h @@ -14,7 +14,7 @@ Headers/GWP2P.h - M7yDtyM42ylW+TUlmhIzAeQMm48= + liZyR4OOyDZJLVYePutP2FGuZ6w= Headers/GWP2PClient+APMode.h @@ -22,7 +22,7 @@ Headers/GWP2PClient+Alarm.h - gjdTj+8WL0bZiRGOy/uygkTrEWc= + BP9SrnAEh2hirTF5DzfyK2FInjI= Headers/GWP2PClient+Defense.h @@ -50,11 +50,11 @@ Headers/GWP2PClient+Record.h - Azon8Lg4aPzChgoQ/xWyNhraqa4= + 5bOV2cllYEWFjtNSr/WSShm2AEc= Headers/GWP2PClient+SceneMode.h - pwlPuiVmuZhyMjlyGO2egM3C18s= + +DFyByRLpU2+QlXi/QVYRtHtEHE= Headers/GWP2PClient+Sensor.h @@ -66,7 +66,7 @@ Headers/GWP2PClient.h - RYvGLk9NxfGf3yLt0TtgMvEw0so= + hR5W3NX/58FZYHAvjuOrYu5YBw8= Headers/GWP2PDefine.h @@ -74,11 +74,11 @@ Headers/GWP2PDevice.h - G8/oP9uZevx53PoZD5T/9vzN/DQ= + r9ERvKBsChVgYdEgPH3oCNtOx30= Headers/GWP2PDeviceLinker.h - ynGGxd+LY4crGQkTI1NLbdDMvpY= + SNU9iYiYC47fBYLndeQidexS0Bs= Headers/GWP2PLanDevice.h @@ -86,20 +86,24 @@ Headers/GWP2PPlaybackPlayer.h - +blua7Uvw/zRvv9+evEuYFEBlgI= + A9vFPZlggZCfl2/yOxDoeTN59Xg= Headers/GWP2PPlayer.h - l7uVOYTsc/CfKJPvCUkpkiL6xHE= + htZ01wr4y8f2Ld/PbpG1Wec31Lc= Headers/GWP2PPlayerDefine.h - YTMpNTvqgumbSqfzU1FBvzK7xlI= + tclepECQZUkTcauXyarYOMeINbA= Headers/GWP2PVideoPlayer.h BngQ84XqDG3xpnszWomlx3Boh14= + Headers/GWQRCodeManager.h + + kIAxpq1Z60YvXk4jJSR2CcAd7ro= + Headers/MD5Manager.h 9Ap+BCQmV4CE/09z8spNS9mQ77k= @@ -119,11 +123,11 @@ hash - /D/h3V7xJHk/BcZAej7Qdp1XAW8= + qOvnF0hkPDvokoux41oP8C9VOR0= hash2 - oj8DULbME/XrojhVsH9vFLl1XLent2Sdu5x1p9A3MJ4= + ZumI3TsE2ot1c4IY6lTZH5ONLSzQxuMiAHuJkK7DJmo= Headers/GWNetError.h @@ -141,11 +145,11 @@ hash - M7yDtyM42ylW+TUlmhIzAeQMm48= + liZyR4OOyDZJLVYePutP2FGuZ6w= hash2 - SYZLQZCuVeESvX/qZvtm5MMR6leqfds0aNxcMy42U/8= + CArVnTeUTjI/UzBiRA4uW9iQ5wBWa+ENTOYwjIpEI6g= Headers/GWP2PClient+APMode.h @@ -163,11 +167,11 @@ hash - gjdTj+8WL0bZiRGOy/uygkTrEWc= + BP9SrnAEh2hirTF5DzfyK2FInjI= hash2 - s6rg3KlpjqO4giyxE0OYvJG42+pnzuiyt/t8HJDHVco= + o4Me3JeSbi0kReFNPJoctpn+P5kStisdPdaX4eHmBio= Headers/GWP2PClient+Defense.h @@ -240,22 +244,22 @@ hash - Azon8Lg4aPzChgoQ/xWyNhraqa4= + 5bOV2cllYEWFjtNSr/WSShm2AEc= hash2 - W7kyLABk/LawcZ+9ZpwnHbTKphiUJ75XMtZ0hs/Wjxg= + jmMpVcBaOKv2p/37inz8msilwARs2kxyoJAkubrteTQ= Headers/GWP2PClient+SceneMode.h hash - pwlPuiVmuZhyMjlyGO2egM3C18s= + +DFyByRLpU2+QlXi/QVYRtHtEHE= hash2 - 8DrEWWnGtOANRPXQoDaQVpO3z7pQB9Bm/rRMZC+gJlM= + sfIYKrZQeLjOwDRmfU5agZwipjx3AM2N7GSAEDmApcI= Headers/GWP2PClient+Sensor.h @@ -284,11 +288,11 @@ hash - RYvGLk9NxfGf3yLt0TtgMvEw0so= + hR5W3NX/58FZYHAvjuOrYu5YBw8= hash2 - CJI8BirmzaJFuN1ZFFikCr9zTkyOto5JRMYsYmi5Ntw= + GbXJCamCzLaBtBHrDe8e2qUKcosxv9+ZYaOM/Tm+HhQ= Headers/GWP2PDefine.h @@ -306,22 +310,22 @@ hash - G8/oP9uZevx53PoZD5T/9vzN/DQ= + r9ERvKBsChVgYdEgPH3oCNtOx30= hash2 - A4XIwRTo78MWLG8iwGYPjg849rPVbe6rhbPyh99oAhA= + hq76cD3su7KZwpO2FzOxjh9HhCMt2f1XNvF0a+mmrkA= Headers/GWP2PDeviceLinker.h hash - ynGGxd+LY4crGQkTI1NLbdDMvpY= + SNU9iYiYC47fBYLndeQidexS0Bs= hash2 - s8Voc6sCJn8BjsAXJJDGUDnrxEFNvhVZRRiVWeYT5PA= + xdWYPxEsat0fBBthyGFQ3yC/xBR4sMWR1L4GuVzG+gI= Headers/GWP2PLanDevice.h @@ -339,33 +343,33 @@ hash - +blua7Uvw/zRvv9+evEuYFEBlgI= + A9vFPZlggZCfl2/yOxDoeTN59Xg= hash2 - fCbJW58v8fFL2guvsn6wZ1o9t7zRonmcvDXlRV80DXY= + ds7+FxuUguCSh11xYIzLv7aPM4MgLc+CWxKEeAYzTk8= Headers/GWP2PPlayer.h hash - l7uVOYTsc/CfKJPvCUkpkiL6xHE= + htZ01wr4y8f2Ld/PbpG1Wec31Lc= hash2 - nujAzHkU1eAeqoJX41QIuENbJmNST46VskCKMksstFA= + ftFc90AfZVS/XHDlrQKYs1iCcgaEO11JKStE7rII3as= Headers/GWP2PPlayerDefine.h hash - YTMpNTvqgumbSqfzU1FBvzK7xlI= + tclepECQZUkTcauXyarYOMeINbA= hash2 - edkPjmBz3IjZ3K+48tWugH1KiIPqfbDzy2fJjabfmYQ= + bQH3yY1GE6ukMWghneVwxKpq+m3WXhtADYGjPIfTx80= Headers/GWP2PVideoPlayer.h @@ -379,6 +383,17 @@ Ra6aFpCNNl/BwtNWr3IoZMEkpNG46c+/w9XhN6+jMMU= + Headers/GWQRCodeManager.h + + hash + + kIAxpq1Z60YvXk4jJSR2CcAd7ro= + + hash2 + + TaBsJLmgQ6Zfeghkk2WxPYr72/x7s316O4Ig4uHFCwQ= + + Headers/MD5Manager.h hash diff --git a/Ifish/Utinitys/Define.h b/Ifish/Utinitys/Define.h index babca16..7dd02b9 100644 --- a/Ifish/Utinitys/Define.h +++ b/Ifish/Utinitys/Define.h @@ -36,6 +36,10 @@ #define IFISHRGBA(r, g, b, a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a] #define IFISHRGB(r, g, b) IFISHRGBA(r, g, b, 1.0f) +#define RGB_92 RGB(90, 90, 90) + +#define RGB_51 RGB(51, 51, 51) + //摄像头部分 #define JWUIColorFromRGB(rgbValue) [UIColor \ colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.h b/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.h new file mode 100644 index 0000000..22cb4d4 --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.h @@ -0,0 +1,21 @@ +// +// ConAquarChooseWiFiVC.h +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 选取设备WiFi + */ +@interface ConAquarChooseWiFiVC : BaseViewController +Copy NSString *wifiName; +Copy NSString *wifiPwd; +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.m b/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.m new file mode 100644 index 0000000..d745c4c --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarChooseWiFiVC.m @@ -0,0 +1,147 @@ +// +// ConAquarChooseWiFiVC.m +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "ConAquarChooseWiFiVC.h" +#import "ConnectingAquarVC.h" +#import +@interface ConAquarChooseWiFiVC () +Strong UIImageView *topImage; +Strong UIButton *connectWiFiBtn; +Assign BOOL isGoChangeWiFi;//更换为设备的WiFi +@end + +@implementation ConAquarChooseWiFiVC +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:Noti_WillEnterForeground object:nil]; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self addTitleViewWithTitle:@"选择设备WiFi"]; + + [self.view addSubview:self.topImage]; + + [self.view addSubview:self.connectWiFiBtn]; + + [self addContentLabel]; + + [self.topImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.left.right.mas_equalTo(self.view); + make.height.mas_equalTo(kSizeFrom750(424)); + }]; + + [self.connectWiFiBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.view); + make.bottom.mas_equalTo(-kSizeFrom750(60)); + make.width.mas_equalTo(kSizeFrom750(400)); + make.height.mas_equalTo(kSizeFrom750(60)); + }]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(viewWillEnterForeground:) name:Noti_WillEnterForeground object:nil]; + // Do any additional setup after loading the view. +} +- (UIImageView *)topImage +{ + if (!_topImage) { + _topImage = InitObject(UIImageView); + [_topImage setImage:IMAGEBYENAME(@"icons_con_topbg")]; + } + return _topImage; +} +- (UIButton *)connectWiFiBtn{ + if (!_connectWiFiBtn) { + _connectWiFiBtn = InitObject(UIButton); + [_connectWiFiBtn setTitle:@"去设置WiFi" forState:UIControlStateNormal]; + [_connectWiFiBtn setBackgroundColor:RGB(88, 151, 231)]; + [_connectWiFiBtn setTitleColor:XWhite forState:UIControlStateNormal]; + [_connectWiFiBtn.titleLabel setFont:FontSize(14)]; + _connectWiFiBtn.layer.cornerRadius = kSizeFrom750(10); + _connectWiFiBtn.layer.masksToBounds = YES; + [_connectWiFiBtn addTarget:self action:@selector(connectWiFiBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + } + return _connectWiFiBtn; +} +-(void)addContentLabel{ + UILabel *preLabel; + NSArray *textArr = @[@"1.请将产品15秒内断电通电3次进入热点模式;",@"2.点击去设置:设置-WiFi-选择ifish-xxx的网络,输入密码12345678,连接好后返回爱奇鱼app。"]; + for (int i=0; i<2; i++) { + UILabel *label = InitObject(UILabel); + label.text = textArr[i]; + label.textColor = RGB_92; + label.font = FontSize(12); + label.numberOfLines = 0; + [self.view addSubview:label]; + + [label mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(kSizeFrom750(60)); + make.right.mas_equalTo(-kSizeFrom750(60)); + if (preLabel==nil) { + make.top.mas_equalTo(self.topImage.mas_bottom).offset(kSizeFrom750(120)); + } else { + make.top.mas_equalTo(preLabel.mas_bottom).offset(kSizeFrom750(30)); + } + }]; + preLabel = label; + } +} +//跳转到WiFi设置页面 +-(void)connectWiFiBtnClick:(UIButton *)sender{ + + NSURL *url1 = [NSURL URLWithString:@"App-prefs:root=WIFI"]; + if ([[UIApplication sharedApplication] canOpenURL:url1]) + { + self.isGoChangeWiFi = YES; + [[UIApplication sharedApplication] openURL:url1]; + } +} +-(void)checkWiFi{ +// NSDictionary *ifs = [self getSSIDInfo]; +// NSString *wifiName = [ifs objectForKey:@"SSID"]; +// if ([wifiName rangeOfString:@"ifish-"].location!=NSNotFound) { + //wifi正确,则尝试连接设备 + ConnectingAquarVC *connecting = InitObject(ConnectingAquarVC); + connecting.wifiName = self.wifiName; + connecting.wifiPassword = self.wifiPwd; + [self.navigationController pushViewController:connecting animated:YES]; +// }else{ +// [self.view makeToast:@"WiFi名称不匹配,请重试"]; +// } + +} +- (id)getSSIDInfo +{ + NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces()); + NSLog(@"%s: Supported interfaces: %@", __func__, ifs); + id info = nil; + for (NSString *ifnam in ifs) { + info = (id)CFBridgingRelease(CNCopyCurrentNetworkInfo((CFStringRef)ifnam)); + if (info && [info count]) { + break; + } + + } + + return info ; +} +//即将进入前台 +-(void)viewWillEnterForeground:(NSNotification *)noti{ + if (self.isGoChangeWiFi) { + [self checkWiFi]; + } +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.h b/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.h new file mode 100644 index 0000000..7514c72 --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.h @@ -0,0 +1,20 @@ +// +// ConAquarMethodVC.h +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 水族箱连接方式选择 + */ +@interface ConAquarMethodVC : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.m b/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.m new file mode 100644 index 0000000..c2b7956 --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarMethodVC.m @@ -0,0 +1,111 @@ +// +// ConAquarMethodVC.m +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "ConAquarMethodVC.h" +#import "SecondConnectWifiController.h" +#import "ConAquarNowWiFiPwdVC.h" +@interface ConAquarMethodVC () +Strong UILabel *subTitleLabel; + +@end + +@implementation ConAquarMethodVC + +- (void)viewDidLoad { + [super viewDidLoad]; + + [self addTitleViewWithTitle:@"连接水族箱"]; + + [self.view addSubview:self.subTitleLabel]; + + NSArray *imageArr = @[@"icons_con_01",@"icons_con_02"]; + NSArray *titleArr = @[@"智能连接",@"热点连接"]; + for (int i=0; i<2; i++) { + UIButton *contentView = InitObject(UIButton); + [contentView addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside]; + contentView.tag = i; + [self.view addSubview:contentView]; + + contentView.backgroundColor = XWhite; + contentView.layer.cornerRadius = kSizeFrom750(10); + contentView.layer.masksToBounds = YES; + [contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.view); + make.width.mas_equalTo(kSizeFrom750(650)); + make.height.mas_equalTo(kSizeFrom750(140)); + make.top.mas_equalTo(self.subTitleLabel.mas_bottom).offset(kSizeFrom750(60)+i*kSizeFrom750(200)); + }]; + + UIImageView *iconImage = InitObject(UIImageView); + [iconImage setImage:IMAGEBYENAME(imageArr[i])]; + [contentView addSubview:iconImage]; + + [iconImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(contentView); + make.left.mas_equalTo(kSizeFrom750(50)); + make.width.height.mas_equalTo(kSizeFrom750(84)); + }]; + + UILabel *titleL = InitObject(UILabel); + titleL.text = titleArr[i]; + titleL.textColor = RGB(130, 130, 130); + titleL.font = FontSize(18); + [contentView addSubview:titleL]; + + [titleL mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(iconImage.mas_right).offset(kSizeFrom750(30)); + make.centerY.mas_equalTo(iconImage); + }]; + + UIImageView *rightArrow = InitObject(UIImageView); + [rightArrow setImage:IMAGEBYENAME(@"right_arrow")]; + [contentView addSubview:rightArrow]; + + [rightArrow mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(titleL); + make.right.mas_equalTo(-kSizeFrom750(30)); + make.width.height.mas_equalTo(kSizeFrom750(44)); + }]; + } + + self.view.backgroundColor = COLOR_Background; + // Do any additional setup after loading the view. +} +-(void)buttonClick:(UIButton *)sender{ + self.hidesBottomBarWhenPushed = YES; + if (sender.tag==0) { + SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init]; + wifivc.vcTitle=@"连接水族箱"; + [self.navigationController pushViewController:wifivc animated:YES]; + }else{ + ConAquarNowWiFiPwdVC *vc = InitObject(ConAquarNowWiFiPwdVC); + [self.navigationController pushViewController:vc animated:YES]; + } +} +- (UILabel *)subTitleLabel +{ + if (!_subTitleLabel) { + _subTitleLabel = InitObject(UILabel); + _subTitleLabel.font = FontSize(16); + _subTitleLabel.text = @"请选择合适的连接方式"; + _subTitleLabel.textColor = RGB_92; + } + return _subTitleLabel; +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.h b/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.h new file mode 100644 index 0000000..deca40a --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.h @@ -0,0 +1,20 @@ +// +// ConAquarNowWiFiPwdVC.h +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 输入当前wifi密码页面 + */ +@interface ConAquarNowWiFiPwdVC : BaseViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.m b/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.m new file mode 100644 index 0000000..b76ff02 --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConAquarNowWiFiPwdVC.m @@ -0,0 +1,225 @@ +// +// ConAquarNowWiFiPwdVC.m +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "ConAquarNowWiFiPwdVC.h" +#import +#import "ConAquarChooseWiFiVC.h" +#import "IQKeyboardManager.h" +@interface ConAquarNowWiFiPwdVC () +Strong UILabel *titleL; +Strong UILabel *subTitleL; +Strong UITextField *wifiNameTextField; +Strong UITextField *wifiPwdTextField; +Strong UIButton *nextBtn; +@end + +@implementation ConAquarNowWiFiPwdVC +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + [self.wifiPwdTextField becomeFirstResponder]; + [IQKeyboardManager sharedManager].enable = NO; +} +- (void)viewWillDisappear:(BOOL)animated{ + [IQKeyboardManager sharedManager].enable = YES; +} +- (void)viewDidLoad { + [super viewDidLoad]; + [self addTitleViewWithTitle:@"连接网络"]; + + [self.view addSubview:self.titleL]; + + [self.view addSubview:self.subTitleL]; + + [self.view addSubview:self.wifiNameTextField]; + + [self.view addSubview:self.wifiPwdTextField]; + + [self.view addSubview:self.nextBtn]; + + [self loadLayout]; + + NSDictionary *ifs = [self getSSIDInfo]; + self.wifiNameTextField.text = [ifs objectForKey:@"SSID"]; + + // Do any additional setup after loading the view. +} +- (UILabel *)titleL +{ + if (!_titleL) { + _titleL = InitObject(UILabel); + _titleL.text = @"设备需要连接的WiFi"; + _titleL.textAlignment = NSTextAlignmentCenter; + _titleL.font = FontSize(16); + _titleL.textColor = RGB_92; + } + return _titleL; +} +- (UILabel *)subTitleL +{ + if (!_subTitleL) { + _subTitleL = InitObject(UILabel); + _subTitleL.text = @"设备暂不支持5G路由WiFi"; + _subTitleL.textAlignment = NSTextAlignmentCenter; + _subTitleL.font = FontSize(12); + _subTitleL.textColor = RGB_92; + } + return _subTitleL; +} +- (UIButton *)nextBtn{ + if (!_nextBtn) { + _nextBtn = InitObject(UIButton); + [_nextBtn setTitle:@"下一步" forState:UIControlStateNormal]; + [_nextBtn setBackgroundColor:RGB(88, 151, 231)]; + [_nextBtn setTitleColor:XWhite forState:UIControlStateNormal]; + [_nextBtn.titleLabel setFont:FontSize(14)]; + _nextBtn.layer.cornerRadius = kSizeFrom750(10); + _nextBtn.layer.masksToBounds = YES; + [_nextBtn addTarget:self action:@selector(nextBtnClick:) forControlEvents:UIControlEventTouchUpInside]; + } + return _nextBtn; +} +-(UITextField*)wifiNameTextField{ + if (!_wifiNameTextField) { + _wifiNameTextField = InitObject(UITextField); + _wifiNameTextField.placeholder = @"请输入WiFi名称"; + _wifiNameTextField.font = FontSize(14); + _wifiNameTextField.delegate = self; + _wifiNameTextField.backgroundColor = XWhite; + _wifiNameTextField.layer.masksToBounds = YES; + _wifiNameTextField.layer.cornerRadius = kSizeFrom750(10); + _wifiNameTextField.leftViewMode = UITextFieldViewModeAlways; + UIView *leftView = InitObject(UIView); + leftView.frame = RECT(0, 0, kSizeFrom750(90), kSizeFrom750(90)); + UIImageView *leftImage = [[UIImageView alloc] init]; + [leftView addSubview:leftImage]; + [leftImage setImage:IMAGEBYENAME(@"icons_con_wifi")]; + [leftImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.mas_equalTo(leftView); + make.width.height.mas_equalTo(kSizeFrom750(50)); + }]; + _wifiNameTextField.leftView = leftView; + + } + return _wifiNameTextField; +} +-(UITextField*)wifiPwdTextField{ + if (!_wifiPwdTextField) { + _wifiPwdTextField = InitObject(UITextField); + _wifiPwdTextField.placeholder = @"请输入WiFi密码"; + _wifiPwdTextField.font = FontSize(14); + _wifiPwdTextField.keyboardType = UIKeyboardTypeAlphabet; + _wifiPwdTextField.delegate = self; + _wifiPwdTextField.backgroundColor = XWhite; + _wifiPwdTextField.secureTextEntry = YES; + _wifiPwdTextField.layer.masksToBounds = YES; + _wifiPwdTextField.layer.cornerRadius = kSizeFrom750(10); + _wifiPwdTextField.leftViewMode = UITextFieldViewModeAlways; + UIView *leftView = InitObject(UIView); + leftView.frame = RECT(0, 0, kSizeFrom750(90), kSizeFrom750(90)); + UIImageView *leftImage = [[UIImageView alloc] init]; + [leftView addSubview:leftImage]; + [leftImage setImage:IMAGEBYENAME(@"icons_con_lock")]; + [leftImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.mas_equalTo(leftView); + make.width.height.mas_equalTo(kSizeFrom750(60)); + }]; + _wifiPwdTextField.leftView = leftView; + } + return _wifiPwdTextField; +} +-(void)loadLayout{ + [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kSizeFrom750(88)); + make.centerX.mas_equalTo(self.view); + }]; + + [self.subTitleL mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.titleL); + make.top.mas_equalTo(self.titleL.mas_bottom).offset(kSizeFrom750(10)); + }]; + + [self.wifiNameTextField mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.subTitleL.mas_bottom).offset(kSizeFrom750(80)); + make.centerX.mas_equalTo(self.subTitleL); + make.width.mas_equalTo(kSizeFrom750(690)); + make.height.mas_equalTo(kSizeFrom750(90)); + }]; + + [self.wifiPwdTextField mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.width.height.mas_equalTo(self.wifiNameTextField); + make.top.mas_equalTo(self.wifiNameTextField.mas_bottom).offset(kSizeFrom750(50)); + }]; + + [self.nextBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.view); + make.top.mas_equalTo(self.wifiPwdTextField.mas_bottom).offset(kSizeFrom750(100)); + make.width.mas_equalTo(kSizeFrom750(400)); + make.height.mas_equalTo(kSizeFrom750(55)); + }]; + + [self addContentLabel];; +} +-(void)addContentLabel{ + + UILabel *preLabel; + NSArray *textArr = @[@"1.选择信号较强的2.4G WiFi,将设备和手机尽量靠近路由器,正确填写WiFi密码即可快速让设备联备;",@"2.设备暂不支持5G WiFi,若已连接,请切换2.4G WiFi;",@"3.路由器不能开启如AP隔离、防蹭网、WLAN助手等限制WiFi接入的选项;",@"4.设备暂不支持WAP/WPA2 企业级WiFi,若已连接,请切换其他WiFi。"]; + for (int i=3; i>=0; i--) { + UILabel *label = InitObject(UILabel); + label.text = textArr[i]; + label.textColor = RGB_92; + label.font = FontSize(12); + label.numberOfLines = 0; + [self.view addSubview:label]; + + [label mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(kSizeFrom750(60)); + make.right.mas_equalTo(-kSizeFrom750(60)); + if (preLabel==nil) { + make.bottom.mas_equalTo(self.view).offset(-kSizeFrom750(30)); + } else { + make.bottom.mas_equalTo(preLabel.mas_top).offset(-kSizeFrom750(30)); + } + }]; + preLabel = label; + } +} +//获取WiFi信息 +- (id)getSSIDInfo +{ + NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces()); + NSLog(@"%s: Supported interfaces: %@", __func__, ifs); + id info = nil; + for (NSString *ifnam in ifs) { + info = (id)CFBridgingRelease(CNCopyCurrentNetworkInfo((CFStringRef)ifnam)); + if (info && [info count]) { + break; + } + + } + + return info ; +} +#pragma mark --buttonClick +-(void)nextBtnClick:(UIButton *)sender{ + ConAquarChooseWiFiVC *chooseVC = InitObject(ConAquarChooseWiFiVC); + chooseVC.wifiName = self.wifiNameTextField.text; + chooseVC.wifiPwd = self.wifiPwdTextField.text; + [self.navigationController pushViewController:chooseVC animated:YES]; +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.h b/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.h new file mode 100644 index 0000000..2341c4e --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.h @@ -0,0 +1,21 @@ +// +// ConnectingAquarVC.h +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "BaseViewController.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + 水族箱设备连接中 + */ +@interface ConnectingAquarVC : BaseViewController +Copy NSString *wifiName;//设备要连接的WiFi名称 +Copy NSString *wifiPassword;//智能设备要连接的WiFi密码 +@end + +NS_ASSUME_NONNULL_END diff --git a/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.m b/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.m new file mode 100644 index 0000000..480852b --- /dev/null +++ b/Ifish/controllers/ConnectAauariumVC/ConnectingAquarVC.m @@ -0,0 +1,91 @@ +// +// ConnectingAquarVC.m +// Ifish +// +// Created by wbzhan on 2019/9/20. +// Copyright © 2019 lianlian. All rights reserved. +// + +#import "ConnectingAquarVC.h" +#import "HKPieChartView.h" +#import "dataContorl.h" +#import +#import "IFishHotpotUDPHelper.h" +#import "ESPTouchResult.h" +#import "ESPTouchTask.h" +#import "IfishDataUnity.h" +#import +@interface ConnectingAquarVC () +Strong HKPieChartView *progressView; +Strong UILabel *titleL; +Strong ESPTouchTask* epTask; +Strong NSMutableString *trackString; +/** + 设备返回的mac地址 + */ +Copy NSString *macAddress; +/** + 是否正在绑定设备 + */ +Assign BOOL isBindingDevice; +Strong NSTimer *bindTimer; +Assign NSInteger retryTimes; +@end + +@implementation ConnectingAquarVC + +- (void)viewDidLoad { + [super viewDidLoad]; + + [self addTitleViewWithTitle:@"尝试与设备建立连接"]; + + [self.view addSubview:self.progressView]; + + [self.view addSubview:self.titleL]; + + [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.progressView.mas_bottom).offset(kSizeFrom750(80)); + make.centerX.mas_equalTo(self.view); + make.width.mas_equalTo(kSizeFrom750(700)); + }]; + [self.progressView updatePercent:99 animation:YES]; + //AP模式配网 + [[GWP2PDeviceLinker shareInstance] p2pAPLinkDeviceWithWiFiSSID:self.wifiName wifiPassword:self.wifiPassword devicePassword:@"123" deviceReceive:^(NSString *deviceId, BOOL isSupport) { + // + NSLog(@"设备%@收到WiFi,isSupport:%d",deviceId,isSupport); + } deviceLinkIn:^(NSDictionary *deviceDict) { + //成功 + }]; + + // Do any additional setup after loading the view. +} +- (HKPieChartView *)progressView +{ + if (!_progressView) { + _progressView = [[HKPieChartView alloc]initWithFrame:RECT((screen_width - 100)/2, 120, 100, 100)]; + } + return _progressView; +} +- (UILabel *)titleL +{ + if (!_titleL) { + _titleL = InitObject(UILabel); + _titleL.text = @"设备连接中\n尽量使您的路由器、手机和设备互相靠近"; + _titleL.textAlignment = NSTextAlignmentCenter; + _titleL.font = FontSize(16); + _titleL.numberOfLines = 2; + _titleL.textColor = RGB_92; + } + return _titleL; +} +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQNSArray+Sort.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQNSArray+Sort.h index 4d7c374..f165d85 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQNSArray+Sort.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQNSArray+Sort.h @@ -37,11 +37,11 @@ /** Returns the array by sorting the UIView's by their tag property. */ -@property (nonatomic, readonly, copy) NSArray<__kindof UIView*> * _Nonnull sortedArrayByTag; +@property (nonnull, nonatomic, readonly, copy) NSArray<__kindof UIView*> * sortedArrayByTag; /** Returns the array by sorting the UIView's by their tag property. */ -@property (nonatomic, readonly, copy) NSArray<__kindof UIView*> * _Nonnull sortedArrayByPosition; +@property (nonnull, nonatomic, readonly, copy) NSArray<__kindof UIView*> * sortedArrayByPosition; @end diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.h index 4e3c028..4ce4556 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.h @@ -21,7 +21,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import +#import +#import @interface UIScrollView (Additions) @@ -37,4 +38,18 @@ @property(nonatomic, assign) BOOL shouldRestoreScrollViewContentOffset; +@end + +@interface UITableView (PreviousNextIndexPath) + +-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath; +//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath; + +@end + +@interface UICollectionView (PreviousNextIndexPath) + +-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath; +//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath; + @end diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.m index bfe1fab..0354f64 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIScrollView+Additions.m @@ -51,3 +51,99 @@ } @end + +@implementation UITableView (PreviousNextIndexPath) + +-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath +{ + NSInteger previousRow = indexPath.row - 1; + NSInteger previousSection = indexPath.section; + + //Fixing indexPath + if (previousRow < 0) + { + previousSection -= 1; + + if (previousSection >= 0) + { + previousRow = [self numberOfRowsInSection:previousSection]-1; + } + } + + if (previousRow >= 0 && previousSection >= 0) + { + return [NSIndexPath indexPathForRow:previousRow inSection:previousSection]; + } + + return nil; +} + +//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath +//{ +// NSInteger nextRow = indexPath.row + 1; +// NSInteger nextSection = indexPath.section; +// +// //Fixing indexPath +// if (nextRow >= [self numberOfRowsInSection:nextSection]) +// { +// nextRow = 0; +// nextSection += 1; +// } +// +// if (self.numberOfSections > nextSection && [self numberOfRowsInSection:nextSection] > nextRow) +// { +// return [NSIndexPath indexPathForItem:nextRow inSection:nextSection]; +// } +// +// return nil; +//} +// +@end + +@implementation UICollectionView (PreviousNextIndexPath) + +-(nullable NSIndexPath*)previousIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath +{ + NSInteger previousRow = indexPath.row - 1; + NSInteger previousSection = indexPath.section; + + //Fixing indexPath + if (previousRow < 0) + { + previousSection -= 1; + + if (previousSection >= 0) + { + previousRow = [self numberOfItemsInSection:previousSection]-1; + } + } + + if (previousRow >= 0 && previousSection >= 0) + { + return [NSIndexPath indexPathForItem:previousRow inSection:previousSection]; + } + + return nil; +} + +//-(nullable NSIndexPath*)nextIndexPathOfIndexPath:(nonnull NSIndexPath*)indexPath +//{ +// NSInteger nextRow = indexPath.row + 1; +// NSInteger nextSection = indexPath.section; +// +// //Fixing indexPath +// if (nextRow >= [self numberOfItemsInSection:nextSection]) +// { +// nextRow = 0; +// nextSection += 1; +// } +// +// if (self.numberOfSections > nextSection && [self numberOfItemsInSection:nextSection] > nextRow) +// { +// return [NSIndexPath indexPathForItem:nextRow inSection:nextSection]; +// } +// +// return nil; +//} + +@end diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUITextFieldView+Additions.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUITextFieldView+Additions.m index d17bfaf..e92b798 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUITextFieldView+Additions.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUITextFieldView+Additions.m @@ -38,7 +38,7 @@ { NSNumber *keyboardDistanceFromTextField = objc_getAssociatedObject(self, @selector(keyboardDistanceFromTextField)); - return (keyboardDistanceFromTextField)?[keyboardDistanceFromTextField floatValue]:kIQUseDefaultKeyboardDistance; + return (keyboardDistanceFromTextField != nil)?[keyboardDistanceFromTextField floatValue]:kIQUseDefaultKeyboardDistance; } -(void)setIgnoreSwitchingByNextPrevious:(BOOL)ignoreSwitchingByNextPrevious diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.h index 9598fc6..9737959 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.h @@ -57,8 +57,13 @@ /** Returns the superView of provided class type. + + @param classType class type of the object which is to be search in above hierarchy and return + + @param belowView view object in upper hierarchy where method should stop searching and return nil */ --(nullable UIView*)superviewOfClassType:(nonnull Class)classType; +-(nullable __kindof UIView*)superviewOfClassType:(nonnull Class)classType belowView:(nullable UIView*)belowView; +-(nullable __kindof UIView*)superviewOfClassType:(nonnull Class)classType; /** Returns all siblings of the receiver which canBecomeFirstResponder. @@ -77,7 +82,7 @@ /** Returns searchBar if receiver object is UISearchBarTextField, otherwise return nil. */ -@property (nullable, nonatomic, readonly) UISearchBar *searchBar; +@property (nullable, nonatomic, readonly) UISearchBar *textFieldSearchBar; /** Returns YES if the receiver object is UIAlertSheetTextField, otherwise return NO. diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.m index 54a5433..5f2bbb4 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIView+Hierarchy.m @@ -156,7 +156,12 @@ return finalController; } --(UIView*)superviewOfClassType:(Class)classType +-(UIView*)superviewOfClassType:(nonnull Class)classType +{ + return [self superviewOfClassType:classType belowView:nil]; +} + +-(nullable __kindof UIView*)superviewOfClassType:(nonnull Class)classType belowView:(nullable UIView*)belowView { UIView *superview = self.superview; @@ -184,6 +189,10 @@ return superview; } } + else if (belowView == superview) + { + return nil; + } superview = superview.superview; } @@ -206,7 +215,7 @@ if (_IQcanBecomeFirstResponder == YES) { - _IQcanBecomeFirstResponder = ([self isUserInteractionEnabled] && ![self isHidden] && [self alpha]!=0.0 && ![self isAlertViewTextField] && !self.searchBar); + _IQcanBecomeFirstResponder = ([self isUserInteractionEnabled] && ![self isHidden] && [self alpha]!=0.0 && ![self isAlertViewTextField] && !self.textFieldSearchBar); } return _IQcanBecomeFirstResponder; @@ -376,7 +385,7 @@ return debugInfo; } --(UISearchBar *)searchBar +-(UISearchBar *)textFieldSearchBar { UIResponder *searchBar = [self nextResponder]; diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIViewController+Additions.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIViewController+Additions.h index f7e9893..f134bcb 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIViewController+Additions.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Categories/IQUIViewController+Additions.h @@ -30,8 +30,6 @@ /** Top/Bottom Layout constraint which help library to manage keyboardTextField distance - @message Library is internally handle Safe Area in iOS11 if `canAdjustAdditionalSafeAreaInsets = YES` and there is no need to do any tweak if you already migrated to use Safe Area - @deprecated Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview. */ @property(nullable, nonatomic, strong) IBOutlet NSLayoutConstraint *IQLayoutGuideConstraint __attribute__((deprecated("Due to change in core-logic of handling distance between textField and keyboard distance, this layout contraint tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview."))); diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Constants/IQKeyboardManagerConstantsInternal.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Constants/IQKeyboardManagerConstantsInternal.h index 2225174..0ae4ac4 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Constants/IQKeyboardManagerConstantsInternal.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/Constants/IQKeyboardManagerConstantsInternal.h @@ -25,6 +25,4 @@ #define IQKeyboardManagerConstantsInternal_h -#define IQ_IS_IOS10_OR_GREATER ([[NSProcessInfo processInfo] operatingSystemVersion].majorVersion >= 10) - #endif diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.h index c6714e0..8d70a0d 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.h @@ -86,13 +86,6 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag; */ @property(nonatomic, assign) CGFloat keyboardDistanceFromTextField; -/** - Prevent keyboard manager to slide up the rootView to more than keyboard height. Default is YES. - - Due to change in core-logic of handling distance between textField and keyboard distance, this tweak is no longer needed and things will just work out of the box for most of the cases. - */ -@property(nonatomic, assign) BOOL preventShowingBottomBlankSpace __attribute__((deprecated("Due to change in core-logic of handling distance between textField and keyboard distance, this tweak is no longer needed and things will just work out of the box for most of the cases. This property will be removed in future release."))); - /** Refreshes textField/textView position if any external changes is explicitly made by user. */ @@ -128,17 +121,17 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag; @property(nonatomic, assign) IQAutoToolbarManageBehaviour toolbarManageBehaviour; /** - If YES, then uses textField's tintColor property for IQToolbar, otherwise tint color is black. Default is NO. + If YES, then uses textField's tintColor property for IQToolbar, otherwise tint color is nil. Default is NO. */ @property(nonatomic, assign) BOOL shouldToolbarUsesTextFieldTintColor; /** - This is used for toolbar.tintColor when textfield.keyboardAppearance is UIKeyboardAppearanceDefault. If shouldToolbarUsesTextFieldTintColor is YES then this property is ignored. Default is nil and uses black color. + This is used for toolbar.tintColor when textfield.keyboardAppearance is UIKeyboardAppearanceDefault. If shouldToolbarUsesTextFieldTintColor is YES then this property is ignored. Default is nil. */ @property(nullable, nonatomic, strong) UIColor *toolbarTintColor; /** - This is used for toolbar.barTintColor. Default is nil and uses white color. + This is used for toolbar.barTintColor. Default is nil. */ @property(nullable, nonatomic, strong) UIColor *toolbarBarTintColor; @@ -166,7 +159,6 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag; /** If YES, then it add the textField's placeholder text on IQToolbar. Default is YES. */ -@property(nonatomic, assign) BOOL shouldShowTextFieldPlaceholder __attribute__((deprecated("This is renamed to `shouldShowToolbarPlaceholder` for more clear naming."))); @property(nonatomic, assign) BOOL shouldShowToolbarPlaceholder; /** @@ -180,7 +172,7 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag; @property(nullable, nonatomic, strong) UIColor *placeholderColor; /** - Placeholder Button Color when it's treated as button. Default is nil. Which means iOS Blue for light toolbar and Yellow for dark toolbar + Placeholder Button Color when it's treated as button. Default is nil */ @property(nullable, nonatomic, strong) UIColor *placeholderButtonColor; @@ -258,26 +250,6 @@ extern NSInteger const kIQPreviousNextButtonToolbarTag; */ @property(nonatomic, assign) BOOL layoutIfNeededOnUpdate; -///----------------------------------------------- -/// @name InteractivePopGestureRecognizer handling -///----------------------------------------------- - -/** - If YES, then always consider UINavigationController.view begin point as {0,0}, this is a workaround to fix a bug #464 because there are no notification mechanism exist when UINavigationController.view.frame gets changed internally. - */ -@property(nonatomic, assign) BOOL shouldFixInteractivePopGestureRecognizer __attribute__((deprecated("Due to change in core-logic of handling distance between textField and keyboard distance, this tweak is no longer needed and things will just work out of the box for most of the cases. This property will be removed in future release."))); - -#ifdef __IPHONE_11_0 -///--------------------------- -/// @name Safe Area -///--------------------------- - -/** - If YES, then library will try to adjust viewController.additionalSafeAreaInsets to automatically handle layout guide. Default is NO. - */ -@property(nonatomic, assign) BOOL canAdjustAdditionalSafeAreaInsets __attribute__((deprecated("Due to change in core-logic of handling distance between textField and keyboard distance, this safe area tweak is no longer needed and things will just work out of the box regardless of constraint pinned with safeArea/layoutGuide/superview. This property will be removed in future release."))); -#endif - ///--------------------------------------------- /// @name Class Level enabling/disabling methods ///--------------------------------------------- diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.m index 13d5b58..347feb6 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardManager.m @@ -44,11 +44,17 @@ #import #import #import +#import +#import #import #import #import #import - +#import +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 +#import +#import +#endif NSInteger const kIQDoneButtonToolbarTag = -1002; NSInteger const kIQPreviousNextButtonToolbarTag = -1005; @@ -71,16 +77,16 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; /*******************************************/ /** To save UITextField/UITextView object voa textField/textView notifications. */ -@property(nonatomic, weak) UIView *textFieldView; +@property(nullable, nonatomic, weak) UIView *textFieldView; /** To save rootViewController.view.frame.origin. */ @property(nonatomic, assign) CGPoint topViewBeginOrigin; /** To save rootViewController */ -@property(nonatomic, weak) UIViewController *rootViewController; +@property(nullable, nonatomic, weak) UIViewController *rootViewController; /** To overcome with popGestureRecognizer issue Bug ID: #1361 */ -@property(nonatomic, weak) UIViewController *rootViewControllerWhilePopGestureRecognizerActive; +@property(nullable, nonatomic, weak) UIViewController *rootViewControllerWhilePopGestureRecognizerActive; @property(nonatomic, assign) CGPoint topViewBeginOriginWhilePopGestureRecognizerActive; /** To know if we have any pending request to adjust view position. */ @@ -89,7 +95,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; /*******************************************/ /** Variable to save lastScrollView that was scrolled. */ -@property(nonatomic, weak) UIScrollView *lastScrollView; +@property(nullable, nonatomic, weak) UIScrollView *lastScrollView; /** LastScrollView's initial contentInsets. */ @property(nonatomic, assign) UIEdgeInsets startingContentInsets; @@ -120,8 +126,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; /*******************************************/ -@property(nonatomic, strong, nonnull, readwrite) NSMutableSet *registeredClasses; - @property(nonatomic, strong, nonnull, readwrite) NSMutableSet *disabledDistanceHandlingClasses; @property(nonatomic, strong, nonnull, readwrite) NSMutableSet *enabledDistanceHandlingClasses; @@ -148,7 +152,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; NSNotification *_kbShowNotification; /** To save keyboard size. */ - CGSize _kbSize; + CGRect _kbFrame; /*******************************************/ } @@ -168,7 +172,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; @synthesize shouldToolbarUsesTextFieldTintColor = _shouldToolbarUsesTextFieldTintColor; @synthesize toolbarTintColor = _toolbarTintColor; @synthesize toolbarBarTintColor = _toolbarBarTintColor; -@dynamic shouldShowTextFieldPlaceholder; @synthesize shouldShowToolbarPlaceholder = _shouldShowToolbarPlaceholder; @synthesize placeholderFont = _placeholderFont; @synthesize placeholderColor = _placeholderColor; @@ -186,33 +189,38 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; #pragma mark - Initializing functions -/** Override +load method to enable KeyboardManager when class loader load IQKeyboardManager. Enabling when app starts (No need to write any code) */ +/** + Override +load method to enable KeyboardManager when class loader load IQKeyboardManager. Enabling when app starts (No need to write any code) + + @Note: If you want to disable `+ (void)load` method, you can add build setting in configurations. Like that: + `{ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) IQ_KEYBOARD_MANAGER_LOAD_METHOD_DISABLE=1' }` + */ +#if !IQ_KEYBOARD_MANAGER_LOAD_METHOD_DISABLE +(void)load { //Enabling IQKeyboardManager. Loading asynchronous on main thread [self performSelectorOnMainThread:@selector(sharedManager) withObject:nil waitUntilDone:NO]; } +#endif /* Singleton Object Initialization. */ -(instancetype)init { if (self = [super init]) { - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - __strong typeof(self) strongSelf = weakSelf; - - strongSelf.registeredClasses = [[NSMutableSet alloc] init]; - + __strong __typeof__(self) strongSelf = weakSelf; + [strongSelf registerAllNotifications]; //Creating gesture for @shouldResignOnTouchOutside. (Enhancement ID: #14) - strongSelf.resignFirstResponderGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognized:)]; + strongSelf.resignFirstResponderGesture = [[UITapGestureRecognizer alloc] initWithTarget:strongSelf action:@selector(tapRecognized:)]; strongSelf.resignFirstResponderGesture.cancelsTouchesInView = NO; - [strongSelf.resignFirstResponderGesture setDelegate:self]; + [strongSelf.resignFirstResponderGesture setDelegate:strongSelf]; strongSelf.resignFirstResponderGesture.enabled = strongSelf.shouldResignOnTouchOutside; strongSelf.topViewBeginOrigin = kIQCGPointInvalid; strongSelf.topViewBeginOriginWhilePopGestureRecognizerActive = kIQCGPointInvalid; @@ -220,17 +228,18 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //Setting it's initial values strongSelf.animationDuration = 0.25; strongSelf.animationCurve = UIViewAnimationCurveEaseInOut; - [self setEnable:YES]; - [self setKeyboardDistanceFromTextField:10.0]; - [self setShouldPlayInputClicks:YES]; - [self setShouldResignOnTouchOutside:NO]; - [self setOverrideKeyboardAppearance:NO]; - [self setKeyboardAppearance:UIKeyboardAppearanceDefault]; - [self setEnableAutoToolbar:YES]; - [self setShouldShowToolbarPlaceholder:YES]; - [self setToolbarManageBehaviour:IQAutoToolbarBySubviews]; - [self setLayoutIfNeededOnUpdate:NO]; - + [strongSelf setEnable:YES]; + [strongSelf setKeyboardDistanceFromTextField:10.0]; + [strongSelf setShouldPlayInputClicks:YES]; + [strongSelf setShouldResignOnTouchOutside:NO]; + [strongSelf setOverrideKeyboardAppearance:NO]; + [strongSelf setKeyboardAppearance:UIKeyboardAppearanceDefault]; + [strongSelf setEnableAutoToolbar:YES]; + [strongSelf setShouldShowToolbarPlaceholder:YES]; + [strongSelf setToolbarManageBehaviour:IQAutoToolbarBySubviews]; + [strongSelf setLayoutIfNeededOnUpdate:NO]; + [strongSelf setShouldToolbarUsesTextFieldTintColor:NO]; + //Loading IQToolbar, IQTitleBarButtonItem, IQBarButtonItem to fix first time keyboard appearance delay (Bug ID: #550) { //If you experience exception breakpoint issue at below line then try these solutions https://stackoverflow.com/questions/27375640/all-exception-break-point-is-stopping-for-no-reason-on-simulator @@ -251,8 +260,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; strongSelf.disabledTouchResignedClasses = [[NSMutableSet alloc] initWithObjects:[UIAlertController class], nil]; strongSelf.enabledTouchResignedClasses = [[NSMutableSet alloc] init]; strongSelf.touchResignedGestureIgnoreClasses = [[NSMutableSet alloc] initWithObjects:[UIControl class],[UINavigationBar class], nil]; - - [self setShouldToolbarUsesTextFieldTintColor:NO]; }); } return self; @@ -290,7 +297,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; if (enable == YES && _enable == NO) { - //Setting NO to _enable. + //Setting YES to _enable. _enable = enable; //If keyboard is currently showing. Sending a fake notification for keyboardWillShow to adjust view according to keyboard. @@ -387,16 +394,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; return enable; } --(BOOL)shouldShowTextFieldPlaceholder -{ - return _shouldShowToolbarPlaceholder; -} - --(void)setShouldShowTextFieldPlaceholder:(BOOL)shouldShowTextFieldPlaceholder -{ - _shouldShowToolbarPlaceholder = shouldShowTextFieldPlaceholder; -} - // Setting keyboard distance from text field. -(void)setKeyboardDistanceFromTextField:(CGFloat)keyboardDistanceFromTextField { @@ -569,14 +566,15 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; /* (Bug ID: #23, #25, #73) */ UIWindow *originalKeyWindow = [[UIApplication sharedApplication] keyWindow]; + UIWindow *strongKeyWindow = _keyWindow; + //If original key window is not nil and the cached keywindow is also not original keywindow then changing keywindow. - if (originalKeyWindow && - _keyWindow != originalKeyWindow) + if (originalKeyWindow && strongKeyWindow != originalKeyWindow) { - _keyWindow = originalKeyWindow; + strongKeyWindow = _keyWindow = originalKeyWindow; } - return _keyWindow; + return strongKeyWindow; } } @@ -586,11 +584,14 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; { _hasPendingAdjustRequest = YES; - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; [[NSOperationQueue mainQueue] addOperationWithBlock:^{ - [self adjustPosition]; - weakSelf.hasPendingAdjustRequest = NO; + + __strong __typeof__(self) strongSelf = weakSelf; + + [strongSelf adjustPosition]; + strongSelf.hasPendingAdjustRequest = NO; }]; } } @@ -606,7 +607,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; // Getting KeyWindow object. UIWindow *keyWindow = [self keyWindow]; - // We are unable to get textField object while keyboard showing on UIWebView's textField. (Bug ID: #11) + // We are unable to get textField object while keyboard showing on WKWebView's textField. (Bug ID: #11) if (_hasPendingAdjustRequest == NO || textFieldView == nil || rootController == nil || @@ -614,7 +615,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; return; CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; // Converting Rectangle according to window bounds. CGRect textFieldViewRectInWindow = [[textFieldView superview] convertRect:textFieldView.frame toView:keyWindow]; @@ -626,7 +627,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; CGFloat specialKeyboardDistanceFromTextField = textFieldView.keyboardDistanceFromTextField; { - UISearchBar *searchBar = textFieldView.searchBar; + UISearchBar *searchBar = textFieldView.textFieldSearchBar; if (searchBar) { @@ -635,10 +636,42 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CGFloat keyboardDistanceFromTextField = (specialKeyboardDistanceFromTextField == kIQUseDefaultKeyboardDistance)?_keyboardDistanceFromTextField:specialKeyboardDistanceFromTextField; - CGSize kbSize = _kbSize; - kbSize.height += keyboardDistanceFromTextField; + + CGSize kbSize; - CGFloat navigationBarAreaHeight = [[UIApplication sharedApplication] statusBarFrame].size.height + rootController.navigationController.navigationBar.frame.size.height; + { + CGRect kbFrame = _kbFrame; + + kbFrame.origin.y -= keyboardDistanceFromTextField; + kbFrame.size.height += keyboardDistanceFromTextField; + + //Calculating actual keyboard displayed size, keyboard frame may be different when hardware keyboard is attached (Bug ID: #469) (Bug ID: #381) (Bug ID: #1506) + CGRect intersectRect = CGRectIntersection(kbFrame, keyWindow.frame); + + if (CGRectIsNull(intersectRect)) + { + kbSize = CGSizeMake(kbFrame.size.width, 0); + } + else + { + kbSize = intersectRect.size; + } + } + + CGFloat statusBarHeight = 0; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 13.0, *)) { + statusBarHeight = [self keyWindow].windowScene.statusBarManager.statusBarFrame.size.height; + + } else +#endif + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + statusBarHeight = [[UIApplication sharedApplication] statusBarFrame].size.height; +#endif + } + + CGFloat navigationBarAreaHeight = statusBarHeight + rootController.navigationController.navigationBar.frame.size.height; CGFloat layoutAreaHeight = rootController.view.layoutMargins.top; CGFloat topLayoutGuide = MAX(navigationBarAreaHeight, layoutAreaHeight) + 5; @@ -669,62 +702,105 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } } + __strong __typeof__(UIScrollView) *strongLastScrollView = _lastScrollView; + //If there was a lastScrollView. // (Bug ID: #34) - if (_lastScrollView) + if (strongLastScrollView) { //If we can't find current superScrollView, then setting lastScrollView to it's original form. if (superScrollView == nil) { - [self showLog:[NSString stringWithFormat:@"Restoring %@ contentInset to : %@ and contentOffset to : %@",[_lastScrollView _IQDescription],NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; - - __weak typeof(self) weakSelf = self; - - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - - __strong typeof(self) strongSelf = weakSelf; - UIScrollView *strongLastScrollView = strongSelf.lastScrollView; - - [strongLastScrollView setContentInset:strongSelf.startingContentInsets]; - strongLastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; - } completion:NULL]; - - if (_lastScrollView.shouldRestoreScrollViewContentOffset) + if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, _startingContentInsets) == NO) { - [_lastScrollView setContentOffset:_startingContentOffset animated:UIView.areAnimationsEnabled]; + [self showLog:[NSString stringWithFormat:@"Restoring ScrollView contentInset to : %@",NSStringFromUIEdgeInsets(_startingContentInsets)]]; + + __weak __typeof__(self) weakSelf = self; + + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + __strong __typeof__(self) strongSelf = weakSelf; + + [strongLastScrollView setContentInset:strongSelf.startingContentInsets]; + strongLastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; + } completion:NULL]; + } + + if (strongLastScrollView.shouldRestoreScrollViewContentOffset && CGPointEqualToPoint(strongLastScrollView.contentOffset, _startingContentOffset) == NO) + { + [self showLog:[NSString stringWithFormat:@"Restoring ScrollView contentOffset to : %@",NSStringFromCGPoint(_startingContentOffset)]]; + + BOOL animatedContentOffset = NO; // (Bug ID: #1365, #1508, #1541) + + if (@available(iOS 9.0, *)) + { + animatedContentOffset = ([textFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil); + } + + if (animatedContentOffset) { + [strongLastScrollView setContentOffset:_startingContentOffset animated:UIView.areAnimationsEnabled]; + } else { + strongLastScrollView.contentOffset = _startingContentOffset; + } } _startingContentInsets = UIEdgeInsetsZero; _startingScrollIndicatorInsets = UIEdgeInsetsZero; _startingContentOffset = CGPointZero; _lastScrollView = nil; + strongLastScrollView = _lastScrollView; } //If both scrollView's are different, then reset lastScrollView to it's original frame and setting current scrollView as last scrollView. - else if (superScrollView != _lastScrollView) + else if (superScrollView != strongLastScrollView) { - [self showLog:[NSString stringWithFormat:@"Restoring %@ contentInset to : %@ and contentOffset to : %@",[_lastScrollView _IQDescription],NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; - - __weak typeof(self) weakSelf = self; - - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - - __strong typeof(self) strongSelf = weakSelf; - UIScrollView *strongLastScrollView = strongSelf.lastScrollView; - - [strongLastScrollView setContentInset:strongSelf.startingContentInsets]; - strongLastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; - } completion:NULL]; - - if (_lastScrollView.shouldRestoreScrollViewContentOffset) + if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, _startingContentInsets) == NO) { - [_lastScrollView setContentOffset:_startingContentOffset animated:UIView.areAnimationsEnabled]; + [self showLog:[NSString stringWithFormat:@"Restoring ScrollView contentInset to : %@",NSStringFromUIEdgeInsets(_startingContentInsets)]]; + + __weak __typeof__(self) weakSelf = self; + + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + __strong __typeof__(self) strongSelf = weakSelf; + + [strongLastScrollView setContentInset:strongSelf.startingContentInsets]; + strongLastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; + } completion:NULL]; + } + + if (strongLastScrollView.shouldRestoreScrollViewContentOffset && CGPointEqualToPoint(strongLastScrollView.contentOffset, _startingContentOffset) == NO) + { + [self showLog:[NSString stringWithFormat:@"Restoring ScrollView contentOffset to : %@",NSStringFromCGPoint(_startingContentOffset)]]; + + BOOL animatedContentOffset = NO; // (Bug ID: #1365, #1508, #1541) + + if (@available(iOS 9.0, *)) + { + animatedContentOffset = ([textFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil); + } + + if (animatedContentOffset) { + [strongLastScrollView setContentOffset:_startingContentOffset animated:UIView.areAnimationsEnabled]; + } else { + strongLastScrollView.contentOffset = _startingContentOffset; + } } _lastScrollView = superScrollView; + strongLastScrollView = _lastScrollView; _startingContentInsets = superScrollView.contentInset; - _startingScrollIndicatorInsets = superScrollView.scrollIndicatorInsets; _startingContentOffset = superScrollView.contentOffset; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 11.1, *)) { + _startingScrollIndicatorInsets = superScrollView.verticalScrollIndicatorInsets; + } else +#endif + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + _startingScrollIndicatorInsets = superScrollView.scrollIndicatorInsets; +#endif + } - [self showLog:[NSString stringWithFormat:@"Saving New %@ contentInset: %@ and contentOffset : %@",[_lastScrollView _IQDescription],NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; + [self showLog:[NSString stringWithFormat:@"Saving New contentInset: %@ and contentOffset : %@",NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; } //Else the case where superScrollView == lastScrollView means we are on same scrollView after switching to different textField. So doing nothing } @@ -732,26 +808,108 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; else if(superScrollView) { _lastScrollView = superScrollView; + strongLastScrollView = _lastScrollView; _startingContentInsets = superScrollView.contentInset; _startingContentOffset = superScrollView.contentOffset; - _startingScrollIndicatorInsets = superScrollView.scrollIndicatorInsets; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 11.1, *)) { + _startingScrollIndicatorInsets = superScrollView.verticalScrollIndicatorInsets; + } else +#endif + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + _startingScrollIndicatorInsets = superScrollView.scrollIndicatorInsets; +#endif + } - [self showLog:[NSString stringWithFormat:@"Saving %@ contentInset: %@ and contentOffset : %@",[_lastScrollView _IQDescription],NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; + [self showLog:[NSString stringWithFormat:@"Saving contentInset: %@ and contentOffset : %@",NSStringFromUIEdgeInsets(_startingContentInsets),NSStringFromCGPoint(_startingContentOffset)]]; } // Special case for ScrollView. { // If we found lastScrollView then setting it's contentOffset to show textField. - if (_lastScrollView) + if (strongLastScrollView) { //Saving UIView *lastView = textFieldView; - superScrollView = _lastScrollView; + superScrollView = strongLastScrollView; //Looping in upper hierarchy until we don't found any scrollView in it's upper hirarchy till UIWindow object. - while (superScrollView && - (move>0?(move > (-superScrollView.contentOffset.y-superScrollView.contentInset.top)):superScrollView.contentOffset.y>0) ) + while (superScrollView) { + BOOL shouldContinue = NO; + + if (move > 0) + { + shouldContinue = move > (-superScrollView.contentOffset.y-superScrollView.contentInset.top); + } + else + { + //Special treatment for UITableView due to their cell reusing logic + if ([superScrollView isKindOfClass:[UITableView class]]) + { + shouldContinue = superScrollView.contentOffset.y>0; + + UITableView *tableView = (UITableView*)superScrollView; + UITableViewCell *tableCell = nil; + NSIndexPath *indexPath = nil; + NSIndexPath *previousIndexPath = nil; + + if (shouldContinue && + (tableCell = (UITableViewCell*)[textFieldView superviewOfClassType:[UITableViewCell class]]) && + (indexPath = [tableView indexPathForCell:tableCell]) && + (previousIndexPath = [tableView previousIndexPathOfIndexPath:indexPath])) + { + CGRect previousCellRect = [tableView rectForRowAtIndexPath:previousIndexPath]; + if (CGRectIsEmpty(previousCellRect) == NO) + { + CGRect previousCellRectInRootSuperview = [tableView convertRect:previousCellRect toView:rootController.view.superview]; + move = MIN(0, CGRectGetMaxY(previousCellRectInRootSuperview) - topLayoutGuide); + } + } + } + //Special treatment for UICollectionView due to their cell reusing logic + else if ([superScrollView isKindOfClass:[UICollectionView class]]) + { + shouldContinue = superScrollView.contentOffset.y>0; + + UICollectionView *collectionView = (UICollectionView*)superScrollView; + UICollectionViewCell *collectionCell = nil; + NSIndexPath *indexPath = nil; + NSIndexPath *previousIndexPath = nil; + + if (shouldContinue && + (collectionCell = (UICollectionViewCell*)[textFieldView superviewOfClassType:[UICollectionViewCell class]]) && + (indexPath = [collectionView indexPathForCell:collectionCell]) && + (previousIndexPath = [collectionView previousIndexPathOfIndexPath:indexPath])) + { + UICollectionViewLayoutAttributes *attributes = [collectionView layoutAttributesForItemAtIndexPath:previousIndexPath]; + + CGRect previousCellRect = attributes.frame; + if (CGRectIsEmpty(previousCellRect) == NO) + { + CGRect previousCellRectInRootSuperview = [collectionView convertRect:previousCellRect toView:rootController.view.superview]; + move = MIN(0, CGRectGetMaxY(previousCellRectInRootSuperview) - topLayoutGuide); + } + } + } + else + { + //If the textField is hidden at the top + shouldContinue = textFieldViewRectInRootSuperview.origin.y < topLayoutGuide; + + if (shouldContinue) { + move = MIN(0, textFieldViewRectInRootSuperview.origin.y - topLayoutGuide); + } + } + } + + if (shouldContinue == NO) + { + move = 0; + break; + } + UIScrollView *nextScrollView = nil; UIScrollView *tempScrollView = (UIScrollView*)[superScrollView superviewOfClassType:[UIScrollView class]]; @@ -805,15 +963,43 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } - //Getting problem while using `setContentOffset:animated:`, So I used animation API. - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - - [self showLog:[NSString stringWithFormat:@"Adjusting %.2f to %@ ContentOffset",(superScrollView.contentOffset.y-shouldOffsetY),[superScrollView _IQDescription]]]; - [self showLog:[NSString stringWithFormat:@"Remaining Move: %.2f",move]]; + CGPoint newContentOffset = CGPointMake(superScrollView.contentOffset.x, shouldOffsetY); + + if (CGPointEqualToPoint(superScrollView.contentOffset, newContentOffset) == NO) + { + __weak __typeof__(self) weakSelf = self; - superScrollView.contentOffset = CGPointMake(superScrollView.contentOffset.x, shouldOffsetY); + //Getting problem while using `setContentOffset:animated:`, So I used animation API. + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + __strong __typeof__(self) strongSelf = weakSelf; - } completion:NULL]; + [strongSelf showLog:[NSString stringWithFormat:@"Adjusting %.2f to %@ ContentOffset",(superScrollView.contentOffset.y-shouldOffsetY),[superScrollView _IQDescription]]]; + [strongSelf showLog:[NSString stringWithFormat:@"Remaining Move: %.2f",move]]; + + BOOL animatedContentOffset = NO; // (Bug ID: #1365, #1508, #1541) + + if (@available(iOS 9.0, *)) + { + animatedContentOffset = ([textFieldView superviewOfClassType:[UIStackView class] belowView:superScrollView] != nil); + } + + if (animatedContentOffset) { + [superScrollView setContentOffset:newContentOffset animated:UIView.areAnimationsEnabled]; + } else { + superScrollView.contentOffset = newContentOffset; + } + } completion:^(BOOL finished){ + + __strong __typeof__(self) strongSelf = weakSelf; + + if ([superScrollView isKindOfClass:[UITableView class]] || [superScrollView isKindOfClass:[UICollectionView class]]) + { + //This will update the next/previous states + [strongSelf addToolbarIfRequired]; + } + }]; + } // Getting next lastView & superScrollView. lastView = superScrollView; @@ -822,33 +1008,39 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //Updating contentInset { - CGRect lastScrollViewRect = [[_lastScrollView superview] convertRect:_lastScrollView.frame toView:keyWindow]; + CGRect lastScrollViewRect = [[strongLastScrollView superview] convertRect:strongLastScrollView.frame toView:keyWindow]; CGFloat bottom = (kbSize.height-keyboardDistanceFromTextField)-(CGRectGetHeight(keyWindow.frame)-CGRectGetMaxY(lastScrollViewRect)); // Update the insets so that the scroll vew doesn't shift incorrectly when the offset is near the bottom of the scroll view. - UIEdgeInsets movedInsets = _lastScrollView.contentInset; + UIEdgeInsets movedInsets = strongLastScrollView.contentInset; movedInsets.bottom = MAX(_startingContentInsets.bottom, bottom); - [self showLog:[NSString stringWithFormat:@"%@ old ContentInset : %@",[_lastScrollView _IQDescription], NSStringFromUIEdgeInsets(_lastScrollView.contentInset)]]; - - __weak typeof(self) weakSelf = self; - - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, movedInsets) == NO) + { + [self showLog:[NSString stringWithFormat:@"old ContentInset : %@ new ContentInset : %@", NSStringFromUIEdgeInsets(strongLastScrollView.contentInset), NSStringFromUIEdgeInsets(movedInsets)]]; - __strong typeof(self) strongSelf = weakSelf; - UIScrollView *strongLastScrollView = strongSelf.lastScrollView; + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + strongLastScrollView.contentInset = movedInsets; + UIEdgeInsets newInset; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 11.1, *)) { + newInset = strongLastScrollView.verticalScrollIndicatorInsets; + } else +#endif + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + newInset = strongLastScrollView.scrollIndicatorInsets; +#endif + } - strongLastScrollView.contentInset = movedInsets; - - UIEdgeInsets newInset = strongLastScrollView.scrollIndicatorInsets; - newInset.bottom = movedInsets.bottom; - strongLastScrollView.scrollIndicatorInsets = newInset; - - } completion:NULL]; - - [self showLog:[NSString stringWithFormat:@"%@ new ContentInset : %@",[_lastScrollView _IQDescription], NSStringFromUIEdgeInsets(_lastScrollView.contentInset)]]; + newInset.bottom = movedInsets.bottom; + strongLastScrollView.scrollIndicatorInsets = newInset; + + } completion:NULL]; + } } } //Going ahead. No else if. @@ -872,36 +1064,46 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; if (textFieldView.frame.size.height-textView.contentInset.bottom>textViewHeight) { - __weak typeof(self) weakSelf = self; - - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + //_isTextViewContentInsetChanged, If frame is not change by library in past, then saving user textView properties (Bug ID: #92) + if (self.isTextViewContentInsetChanged == NO) + { + self.startingTextViewContentInsets = textView.contentInset; - __strong typeof(self) strongSelf = weakSelf; - UIView *strongTextFieldView = strongSelf.textFieldView; - - [self showLog:[NSString stringWithFormat:@"%@ Old UITextView.contentInset : %@",[strongTextFieldView _IQDescription], NSStringFromUIEdgeInsets(textView.contentInset)]]; - - //_isTextViewContentInsetChanged, If frame is not change by library in past, then saving user textView properties (Bug ID: #92) - if (strongSelf.isTextViewContentInsetChanged == NO) +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 11.1, *)) { + self.startingTextViewScrollIndicatorInsets = textView.verticalScrollIndicatorInsets; + } else +#endif { - strongSelf.startingTextViewContentInsets = textView.contentInset; - strongSelf.startingTextViewScrollIndicatorInsets = textView.scrollIndicatorInsets; +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + self.startingTextViewScrollIndicatorInsets = textView.scrollIndicatorInsets; +#endif } + } + + UIEdgeInsets newContentInset = textView.contentInset; + newContentInset.bottom = self.textFieldView.frame.size.height-textViewHeight; + self.isTextViewContentInsetChanged = YES; + + if (UIEdgeInsetsEqualToEdgeInsets(textView.contentInset, newContentInset) == NO) + { + __weak __typeof__(self) weakSelf = self; - UIEdgeInsets newContentInset = textView.contentInset; - newContentInset.bottom = strongTextFieldView.frame.size.height-textViewHeight; - textView.contentInset = newContentInset; - textView.scrollIndicatorInsets = newContentInset; - strongSelf.isTextViewContentInsetChanged = YES; - - [self showLog:[NSString stringWithFormat:@"%@ New UITextView.contentInset : %@",[strongTextFieldView _IQDescription], NSStringFromUIEdgeInsets(textView.contentInset)]]; - - } completion:NULL]; + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + __strong __typeof__(self) strongSelf = weakSelf; + + [strongSelf showLog:[NSString stringWithFormat:@"Old UITextView.contentInset : %@ New UITextView.contentInset : %@", NSStringFromUIEdgeInsets(textView.contentInset), NSStringFromUIEdgeInsets(textView.contentInset)]]; + + textView.contentInset = newContentInset; + textView.scrollIndicatorInsets = newContentInset; + } completion:NULL]; + } } } { - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; // +Positive or zero. if (move>=0) @@ -917,7 +1119,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //Used UIViewAnimationOptionBeginFromCurrentState to minimize strange animations. [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; // Setting it's new frame CGRect rect = rootController.view.frame; @@ -932,7 +1134,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; [rootController.view layoutIfNeeded]; } - [self showLog:[NSString stringWithFormat:@"Set %@ origin to : %@",[rootController _IQDescription],NSStringFromCGPoint(rootViewOrigin)]]; + [strongSelf showLog:[NSString stringWithFormat:@"Set %@ origin to : %@",rootController,NSStringFromCGPoint(rootViewOrigin)]]; } completion:NULL]; _movedDistance = (_topViewBeginOrigin.y-rootViewOrigin.y); @@ -954,7 +1156,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //Used UIViewAnimationOptionBeginFromCurrentState to minimize strange animations. [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; // Setting it's new frame CGRect rect = rootController.view.frame; @@ -969,7 +1171,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; [rootController.view layoutIfNeeded]; } - [self showLog:[NSString stringWithFormat:@"Set %@ origin to : %@",[rootController _IQDescription],NSStringFromCGPoint(rootViewOrigin)]]; + [strongSelf showLog:[NSString stringWithFormat:@"Set %@ origin to : %@",rootController,NSStringFromCGPoint(rootViewOrigin)]]; } completion:NULL]; _movedDistance = (_topViewBeginOrigin.y-rootController.view.frame.origin.y); @@ -979,7 +1181,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } -(void)restorePosition @@ -989,16 +1191,16 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; // Setting rootViewController frame to it's original position. // (Bug ID: #18) if (_rootViewController && CGPointEqualToPoint(_topViewBeginOrigin, kIQCGPointInvalid) == false) { - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; //Used UIViewAnimationOptionBeginFromCurrentState to minimize strange animations. [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; UIViewController *strongRootController = strongSelf.rootViewController; { - [strongSelf showLog:[NSString stringWithFormat:@"Restoring %@ origin to : %@",[strongRootController _IQDescription],NSStringFromCGPoint(strongSelf.topViewBeginOrigin)]]; + [strongSelf showLog:[NSString stringWithFormat:@"Restoring %@ origin to : %@",strongRootController,NSStringFromCGPoint(strongSelf.topViewBeginOrigin)]]; //Restoring CGRect rect = strongRootController.view.frame; @@ -1064,29 +1266,15 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //Saving animation duration if (duration != 0.0) _animationDuration = duration; - CGSize oldKBSize = _kbSize; + CGRect oldKBFrame = _kbFrame; // Getting UIKeyboardSize. - CGRect kbFrame = [[aNotification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue]; + _kbFrame = [[aNotification userInfo][UIKeyboardFrameEndUserInfoKey] CGRectValue]; - CGRect screenSize = [[UIScreen mainScreen] bounds]; - - //Calculating actual keyboard displayed size, keyboard frame may be different when hardware keyboard is attached (Bug ID: #469) (Bug ID: #381) - CGRect intersectRect = CGRectIntersection(kbFrame, screenSize); - - if (CGRectIsNull(intersectRect)) - { - _kbSize = CGSizeMake(screenSize.size.width, 0); - } - else - { - _kbSize = intersectRect.size; - } - if ([self privateIsEnabled] == NO) return; CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; UIView *textFieldView = _textFieldView; @@ -1096,7 +1284,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; UIViewController *rootController = [textFieldView parentContainerViewController]; _rootViewController = rootController; - if (_rootViewControllerWhilePopGestureRecognizerActive == _rootViewController) + if (_rootViewControllerWhilePopGestureRecognizerActive == rootController) { _topViewBeginOrigin = _topViewBeginOriginWhilePopGestureRecognizerActive; } @@ -1108,11 +1296,11 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; _rootViewControllerWhilePopGestureRecognizerActive = nil; _topViewBeginOriginWhilePopGestureRecognizerActive = kIQCGPointInvalid; - [self showLog:[NSString stringWithFormat:@"Saving %@ beginning origin: %@",[rootController _IQDescription] ,NSStringFromCGPoint(_topViewBeginOrigin)]]; + [self showLog:[NSString stringWithFormat:@"Saving %@ beginning origin: %@",rootController,NSStringFromCGPoint(_topViewBeginOrigin)]]; } //If last restored keyboard size is different(any orientation accure), then refresh. otherwise not. - if (!CGSizeEqualToSize(_kbSize, oldKBSize)) + if (!CGRectEqualToRect(_kbFrame, oldKBFrame)) { //If _textFieldView is inside UIAlertView then do nothing. (Bug ID: #37, #74, #76) //See notes:- https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html If it is UIAlertView textField then do not affect anything (Bug ID: #70). @@ -1125,7 +1313,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } /* UIKeyboardDidShowNotification. */ @@ -1134,7 +1322,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; if ([self privateIsEnabled] == NO) return; CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; UIView *textFieldView = _textFieldView; @@ -1151,7 +1339,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } /* UIKeyboardWillHideNotification. So setting rootViewController to it's default frame. */ @@ -1174,34 +1362,54 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; if ([self privateIsEnabled] == NO) return; CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; - //Commented due to #56. Added all the conditions below to handle UIWebView's textFields. (Bug ID: #56) - // We are unable to get textField object while keyboard showing on UIWebView's textField. (Bug ID: #11) + //Commented due to #56. Added all the conditions below to handle WKWebView's textFields. (Bug ID: #56) + // We are unable to get textField object while keyboard showing on WKWebView's textField. (Bug ID: #11) // if (_textFieldView == nil) return; //Restoring the contentOffset of the lastScrollView - if (_lastScrollView) + __strong __typeof__(UIScrollView) *strongLastScrollView = _lastScrollView; + + if (strongLastScrollView) { - __weak typeof(self) weakSelf = self; + __weak __typeof__(self) weakSelf = self; + __weak __typeof__(UIView) *weakTextFieldView = self.textFieldView; [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ - __strong typeof(self) strongSelf = weakSelf; + __strong __typeof__(self) strongSelf = weakSelf; + __strong __typeof__(UIView) *strongTextFieldView = weakTextFieldView; - strongSelf.lastScrollView.contentInset = strongSelf.startingContentInsets; - strongSelf.lastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; - - if (strongSelf.lastScrollView.shouldRestoreScrollViewContentOffset) + if (UIEdgeInsetsEqualToEdgeInsets(strongLastScrollView.contentInset, strongSelf.startingContentInsets) == NO) { - strongSelf.lastScrollView.contentOffset = strongSelf.startingContentOffset; - } + [strongSelf showLog:[NSString stringWithFormat:@"Restoring ScrollView contentInset to : %@",NSStringFromUIEdgeInsets(strongSelf.startingContentInsets)]]; - [self showLog:[NSString stringWithFormat:@"Restoring %@ contentInset to : %@ and contentOffset to : %@",[strongSelf.lastScrollView _IQDescription],NSStringFromUIEdgeInsets(strongSelf.startingContentInsets),NSStringFromCGPoint(strongSelf.startingContentOffset)]]; + strongLastScrollView.contentInset = strongSelf.startingContentInsets; + strongLastScrollView.scrollIndicatorInsets = strongSelf.startingScrollIndicatorInsets; + } + + if (strongLastScrollView.shouldRestoreScrollViewContentOffset && CGPointEqualToPoint(strongLastScrollView.contentOffset, strongSelf.startingContentOffset) == NO) + { + [strongSelf showLog:[NSString stringWithFormat:@"Restoring ScrollView contentOffset to : %@",NSStringFromCGPoint(strongSelf.startingContentOffset)]]; + + BOOL animatedContentOffset = NO; // (Bug ID: #1365, #1508, #1541) + + if (@available(iOS 9.0, *)) + { + animatedContentOffset = ([strongTextFieldView superviewOfClassType:[UIStackView class] belowView:strongLastScrollView] != nil); + } + + if (animatedContentOffset) { + [strongLastScrollView setContentOffset:strongSelf.startingContentOffset animated:UIView.areAnimationsEnabled]; + } else { + strongLastScrollView.contentOffset = strongSelf.startingContentOffset; + } + } // TODO: restore scrollView state // This is temporary solution. Have to implement the save and restore scrollView state - UIScrollView *superscrollView = strongSelf.lastScrollView; + UIScrollView *superscrollView = strongLastScrollView; do { CGSize contentSize = CGSizeMake(MAX(superscrollView.contentSize.width, CGRectGetWidth(superscrollView.frame)), MAX(superscrollView.contentSize.height, CGRectGetHeight(superscrollView.frame))); @@ -1210,9 +1418,24 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; if (minimumY= 130000 + if (@available(iOS 13.0, *)) { + currentStatusBarOrientation = [self keyWindow].windowScene.interfaceOrientation; + } else +#endif + { +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + currentStatusBarOrientation = UIApplication.sharedApplication.statusBarOrientation; +#endif + } + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + UIInterfaceOrientation statusBarOrientation = [aNotification.userInfo[UIApplicationStatusBarOrientationUserInfoKey] integerValue]; +#pragma clang diagnostic pop + + if (statusBarOrientation != currentStatusBarOrientation) { + return; + } + CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; //If textViewContentInsetChanged is changed then restore it. if (_isTextViewContentInsetChanged == YES && [_textFieldView isKindOfClass:[UITextView class]]) { UITextView *textView = (UITextView*)_textFieldView; - - __weak typeof(self) weakSelf = self; - - //Due to orientation callback we need to set it's original position. - [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + self.isTextViewContentInsetChanged = NO; + if (UIEdgeInsetsEqualToEdgeInsets(textView.contentInset, self.startingTextViewContentInsets) == NO) + { + __weak __typeof__(self) weakSelf = self; - __strong typeof(self) strongSelf = weakSelf; - - strongSelf.isTextViewContentInsetChanged = NO; - - [self showLog:[NSString stringWithFormat:@"Restoring %@ textView.contentInset to : %@",[strongSelf.textFieldView _IQDescription],NSStringFromUIEdgeInsets(strongSelf.startingTextViewContentInsets)]]; - - //Setting textField to it's initial contentInset - textView.contentInset = strongSelf.startingTextViewContentInsets; - textView.scrollIndicatorInsets = strongSelf.startingTextViewScrollIndicatorInsets; - } completion:NULL]; + //Due to orientation callback we need to set it's original position. + [UIView animateWithDuration:_animationDuration delay:0 options:(_animationCurve|UIViewAnimationOptionBeginFromCurrentState) animations:^{ + + __strong __typeof__(self) strongSelf = weakSelf; + + [strongSelf showLog:[NSString stringWithFormat:@"Restoring textView.contentInset to : %@",NSStringFromUIEdgeInsets(strongSelf.startingTextViewContentInsets)]]; + + //Setting textField to it's initial contentInset + textView.contentInset = strongSelf.startingTextViewContentInsets; + textView.scrollIndicatorInsets = strongSelf.startingTextViewScrollIndicatorInsets; + } completion:NULL]; + } } [self restorePosition]; CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } #pragma mark AutoResign methods @@ -1490,7 +1740,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //If it refuses to resign then becoming it first responder again for getting notifications callback. [textFieldRetain becomeFirstResponder]; - [self showLog:[NSString stringWithFormat:@"Refuses to Resign first responder: %@",[textFieldView _IQDescription]]]; + [self showLog:[NSString stringWithFormat:@"Refuses to Resign first responder: %@",textFieldView]]; } return isResignFirstResponder; @@ -1569,7 +1819,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //If next field refuses to become first responder then restoring old textField as first responder. [textFieldRetain becomeFirstResponder]; - [self showLog:[NSString stringWithFormat:@"Refuses to become first responder: %@",[nextTextField _IQDescription]]]; + [self showLog:[NSString stringWithFormat:@"Refuses to become first responder: %@",nextTextField]]; } return isAcceptAsFirstResponder; @@ -1606,7 +1856,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; //If next field refuses to become first responder then restoring old textField as first responder. [textFieldRetain becomeFirstResponder]; - [self showLog:[NSString stringWithFormat:@"Refuses to become first responder: %@",[nextTextField _IQDescription]]]; + [self showLog:[NSString stringWithFormat:@"Refuses to become first responder: %@",nextTextField]]; } return isAcceptAsFirstResponder; @@ -1673,7 +1923,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; -(void)addToolbarIfRequired { CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; // Getting all the sibling textFields. NSArray *siblings = [self responderViews]; @@ -1768,7 +2018,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; case UIKeyboardAppearanceDark: { toolbar.barStyle = UIBarStyleBlack; - [toolbar setTintColor:[UIColor whiteColor]]; + [toolbar setTintColor:nil]; [toolbar setBarTintColor:nil]; } break; @@ -1788,7 +2038,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } else { - toolbar.tintColor = [UIColor blackColor]; + toolbar.tintColor = nil; } } break; @@ -1813,15 +2063,13 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } //Setting toolbar title color. // (Enhancement ID: #880) - if (_placeholderColor && - [_placeholderColor isKindOfClass:[UIColor class]]) + if (_placeholderColor) { [toolbar.titleBarButton setTitleColor:_placeholderColor]; } //Setting toolbar button title color. // (Enhancement ID: #880) - if (_placeholderButtonColor && - [_placeholderButtonColor isKindOfClass:[UIColor class]]) + if (_placeholderButtonColor) { [toolbar.titleBarButton setSelectableTitleColor:_placeholderButtonColor]; } @@ -1863,14 +2111,14 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } /** Remove any toolbar if it is IQToolbar. */ -(void)removeToolbarIfRequired // (Bug ID: #18) { CFTimeInterval startTime = CACurrentMediaTime(); - [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)]]; + [self showLog:[NSString stringWithFormat:@"****** %@ started ******",NSStringFromSelector(_cmd)] indentation:1]; // Getting all the sibling textFields. NSArray *siblings = [self responderViews]; @@ -1892,7 +2140,7 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; } CFTimeInterval elapsedTime = CACurrentMediaTime() - startTime; - [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******\n",NSStringFromSelector(_cmd),elapsedTime]]; + [self showLog:[NSString stringWithFormat:@"****** %@ ended: %g seconds ******",NSStringFromSelector(_cmd),elapsedTime] indentation:-1]; } /** reloadInputViews to reload toolbar buttons enable/disable state on the fly Enhancement ID #434. */ @@ -1926,25 +2174,27 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; BOOL isAcceptAsFirstResponder = [self goPrevious]; NSInvocation *invocation = barButton.invocation; + UIView *sender = currentTextFieldView; //Handling search bar special case { - UISearchBar *searchBar = currentTextFieldView.searchBar; + UISearchBar *searchBar = currentTextFieldView.textFieldSearchBar; if (searchBar) { invocation = searchBar.keyboardToolbar.previousBarButton.invocation; + sender = searchBar; } } - if (isAcceptAsFirstResponder == YES && barButton.invocation) + if (isAcceptAsFirstResponder == YES && invocation) { - if (barButton.invocation.methodSignature.numberOfArguments > 2) + if (invocation.methodSignature.numberOfArguments > 2) { - [barButton.invocation setArgument:¤tTextFieldView atIndex:2]; + [invocation setArgument:&sender atIndex:2]; } - [barButton.invocation invoke]; + [invocation invoke]; } } } @@ -1964,25 +2214,27 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; BOOL isAcceptAsFirstResponder = [self goNext]; NSInvocation *invocation = barButton.invocation; + UIView *sender = currentTextFieldView; //Handling search bar special case { - UISearchBar *searchBar = currentTextFieldView.searchBar; + UISearchBar *searchBar = currentTextFieldView.textFieldSearchBar; if (searchBar) { invocation = searchBar.keyboardToolbar.nextBarButton.invocation; + sender = searchBar; } } - if (isAcceptAsFirstResponder == YES && barButton.invocation) + if (isAcceptAsFirstResponder == YES && invocation) { - if (barButton.invocation.methodSignature.numberOfArguments > 2) + if (invocation.methodSignature.numberOfArguments > 2) { - [barButton.invocation setArgument:¤tTextFieldView atIndex:2]; + [invocation setArgument:&sender atIndex:2]; } - [barButton.invocation invoke]; + [invocation invoke]; } } } @@ -2000,25 +2252,27 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; BOOL isResignedFirstResponder = [self resignFirstResponder]; NSInvocation *invocation = barButton.invocation; + UIView *sender = currentTextFieldView; //Handling search bar special case { - UISearchBar *searchBar = currentTextFieldView.searchBar; + UISearchBar *searchBar = currentTextFieldView.textFieldSearchBar; if (searchBar) { invocation = searchBar.keyboardToolbar.doneBarButton.invocation; + sender = searchBar; } } - if (isResignedFirstResponder == YES && barButton.invocation) + if (isResignedFirstResponder == YES && invocation) { - if (barButton.invocation.methodSignature.numberOfArguments > 2) + if (invocation.methodSignature.numberOfArguments > 2) { - [barButton.invocation setArgument:¤tTextFieldView atIndex:2]; + [invocation setArgument:&sender atIndex:2]; } - [barButton.invocation invoke]; + [invocation invoke]; } } @@ -2031,8 +2285,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; didBeginEditingNotificationName:(nonnull NSString *)didBeginEditingNotificationName didEndEditingNotificationName:(nonnull NSString *)didEndEditingNotificationName { - [_registeredClasses addObject:aClass]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldViewDidBeginEditing:) name:didBeginEditingNotificationName object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textFieldViewDidEndEditing:) name:didEndEditingNotificationName object:nil]; } @@ -2044,8 +2296,6 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; didBeginEditingNotificationName:(nonnull NSString *)didBeginEditingNotificationName didEndEditingNotificationName:(nonnull NSString *)didEndEditingNotificationName { - [_registeredClasses removeObject:aClass]; - [[NSNotificationCenter defaultCenter] removeObserver:self name:didBeginEditingNotificationName object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:didEndEditingNotificationName object:nil]; } @@ -2069,7 +2319,10 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; didEndEditingNotificationName:UITextViewTextDidEndEditingNotification]; // Registering for orientation changes notification +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willChangeStatusBarOrientation:) name:UIApplicationWillChangeStatusBarOrientationNotification object:[UIApplication sharedApplication]]; +#pragma clang diagnostic pop } -(void)unregisterAllNotifications @@ -2091,14 +2344,41 @@ NSInteger const kIQPreviousNextButtonToolbarTag = -1005; didEndEditingNotificationName:UITextViewTextDidEndEditingNotification]; // Unregistering for orientation changes notification +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationWillChangeStatusBarOrientationNotification object:[UIApplication sharedApplication]]; +#pragma clang diagnostic pop } -(void)showLog:(NSString*)logString { + [self showLog:logString indentation:0]; +} + +-(void)showLog:(NSString*)logString indentation:(NSInteger)indent +{ + static NSInteger indentation = 0; + + if (indent < 0) + { + indentation = MAX(0, indentation + indent); + } + if (_enableDebugging) { - NSLog(@"IQKeyboardManager: %@",logString); + NSMutableString *preLog = [[NSMutableString alloc] init]; + + for (int i = 0; i<=indentation; i++) { + [preLog appendString:@"|\t"]; + } + + [preLog appendString:logString]; + NSLog(@"%@",preLog); + } + + if (indent > 0) + { + indentation += indent; } } diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardReturnKeyHandler.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardReturnKeyHandler.m index 5fbb415..f71a7f7 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardReturnKeyHandler.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQKeyboardReturnKeyHandler.m @@ -345,14 +345,10 @@ delegate = modal.textFieldDelegate; } -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) { -#endif if ([delegate respondsToSelector:@selector(textFieldDidEndEditing:reason:)]) [delegate textFieldDidEndEditing:textField reason:reason]; -#ifdef __IPHONE_11_0 } -#endif } - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string @@ -539,14 +535,10 @@ delegate = modal.textViewDelegate; } -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) { -#endif if ([delegate respondsToSelector:@selector(textView:shouldInteractWithURL:inRange:interaction:)]) return [delegate textView:textView shouldInteractWithURL:URL inRange:characterRange interaction:interaction]; -#ifdef __IPHONE_11_0 } -#endif return YES; } @@ -561,18 +553,15 @@ delegate = modal.textViewDelegate; } -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) { -#endif if ([delegate respondsToSelector:@selector(textView:shouldInteractWithTextAttachment:inRange:interaction:)]) return [delegate textView:textView shouldInteractWithTextAttachment:textAttachment inRange:characterRange interaction:interaction]; -#ifdef __IPHONE_11_0 } -#endif return YES; } +#if __IPHONE_OS_VERSION_MIN_REQUIRED < 100000 - (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange { id delegate = self.delegate; @@ -583,11 +572,8 @@ delegate = modal.textViewDelegate; } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" if ([delegate respondsToSelector:@selector(textView:shouldInteractWithURL:inRange:)]) return [delegate textView:textView shouldInteractWithURL:URL inRange:characterRange]; -#pragma clang diagnostic pop else return YES; } @@ -602,14 +588,12 @@ delegate = modal.textViewDelegate; } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" if ([delegate respondsToSelector:@selector(textView:shouldInteractWithTextAttachment:inRange:)]) return [delegate textView:textView shouldInteractWithTextAttachment:textAttachment inRange:characterRange]; -#pragma clang diagnostic pop else return YES; } +#endif -(void)dealloc { diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.h index 8ff1859..99a9bfa 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.h @@ -35,6 +35,11 @@ */ @property(nullable, nonatomic,copy) IBInspectable NSString *placeholder; +/** + Set textView's placeholder attributed text. Default is nil. + */ +@property(nullable, nonatomic,copy) IBInspectable NSAttributedString *attributedPlaceholder; + /** To set textView's placeholder text color. Default is nil. */ diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.m index f451552..ca85cd3 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQTextView/IQTextView.m @@ -29,7 +29,7 @@ @interface IQTextView () -@property(nonatomic, strong) UILabel *placeholderLabel; +@property(nullable, nonatomic, strong) UILabel *placeholderLabel; @end @@ -68,7 +68,7 @@ -(void)refreshPlaceholder { - if([[self text] length]) + if([[self text] length] || [[self attributedText] length]) { [_placeholderLabel setAlpha:0]; } @@ -87,6 +87,12 @@ [self refreshPlaceholder]; } +-(void)setAttributedText:(NSAttributedString *)attributedText +{ + [super setAttributedText:attributedText]; + [self refreshPlaceholder]; +} + -(void)setFont:(UIFont *)font { [super setFont:font]; @@ -119,6 +125,14 @@ [self refreshPlaceholder]; } +-(void)setAttributedPlaceholder:(NSAttributedString *)attributedPlaceholder +{ + _attributedPlaceholder = attributedPlaceholder; + + self.placeholderLabel.attributedText = attributedPlaceholder; + [self refreshPlaceholder]; +} + -(void)setPlaceholderTextColor:(UIColor*)placeholderTextColor { _placeholderTextColor = placeholderTextColor; @@ -151,7 +165,16 @@ _placeholderLabel.font = self.font; _placeholderLabel.textAlignment = self.textAlignment; _placeholderLabel.backgroundColor = [UIColor clearColor]; - _placeholderLabel.textColor = [UIColor colorWithWhite:0.7 alpha:1.0]; + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 13.0, *)) { + _placeholderLabel.textColor = [UIColor systemGrayColor]; + } else + #endif + { + #if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + _placeholderLabel.textColor = [UIColor lightTextColor]; + #endif + } _placeholderLabel.alpha = 0; [self addSubview:_placeholderLabel]; } diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQBarButtonItem.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQBarButtonItem.m index fb28fb2..9526456 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQBarButtonItem.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQBarButtonItem.m @@ -92,7 +92,6 @@ -(void)dealloc { self.target = nil; - self.invocation.target = nil; self.invocation = nil; } diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQTitleBarButtonItem.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQTitleBarButtonItem.m index 7a4ffe9..0e17e55 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQTitleBarButtonItem.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQTitleBarButtonItem.m @@ -30,8 +30,8 @@ @interface IQTitleBarButtonItem () -@property(nonatomic, strong) UIView *titleView; -@property(nonatomic, strong) UIButton *titleButton; +@property(nullable, nonatomic, strong) UIView *titleView; +@property(nullable, nonatomic, strong) UIButton *titleButton; @end @@ -48,7 +48,16 @@ _titleButton = [UIButton buttonWithType:UIButtonTypeSystem]; _titleButton.enabled = NO; _titleButton.titleLabel.numberOfLines = 3; - [_titleButton setTitleColor:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal]; + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 13.0, *)) { + [_titleButton setTitleColor:[UIColor systemBlueColor] forState:UIControlStateNormal]; + } else + #endif + { + #if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + [_titleButton setTitleColor:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal]; + #endif + } [_titleButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateDisabled]; [_titleButton setBackgroundColor:[UIColor clearColor]]; [_titleButton.titleLabel setTextAlignment:NSTextAlignmentCenter]; @@ -56,7 +65,6 @@ [self setTitleFont:[UIFont systemFontOfSize:13.0]]; [_titleView addSubview:_titleButton]; -#ifdef __IPHONE_11_0 if (@available(iOS 11.0, *)) { CGFloat layoutDefaultLowPriority = UILayoutPriorityDefaultLow-1; @@ -81,7 +89,6 @@ [_titleView addConstraints:@[top,bottom,leading,trailing]]; } else -#endif { _titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; _titleButton.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; @@ -121,7 +128,16 @@ -(void)setSelectableTitleColor:(UIColor*)selectableTitleColor { _selectableTitleColor = selectableTitleColor; - [_titleButton setTitleColor:_selectableTitleColor?:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal]; + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 + if (@available(iOS 13.0, *)) { + [_titleButton setTitleColor:_selectableTitleColor?:[UIColor systemBlueColor] forState:UIControlStateNormal]; + } else + #endif + { + #if __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + [_titleButton setTitleColor:_selectableTitleColor?:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal]; + #endif + } } -(void)setInvocation:(NSInvocation *)invocation diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQToolbar.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQToolbar.m index 9bb2270..e64bf27 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQToolbar.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQToolbar.m @@ -29,12 +29,6 @@ #import #import -@interface IQTitleBarButtonItem (PrivateAccessor) - -@property(nonatomic, strong) UIButton *titleButton; - -@end - @implementation IQToolbar @synthesize previousBarButton = _previousBarButton; @synthesize nextBarButton = _nextBarButton; @@ -89,11 +83,6 @@ -(void)dealloc { self.items = nil; - _previousBarButton = nil; - _nextBarButton = nil; - _titleBarButton = nil; - _doneBarButton = nil; - _fixedSpaceBarButton = nil; } -(IQBarButtonItem *)previousBarButton @@ -101,7 +90,7 @@ if (_previousBarButton == nil) { _previousBarButton = [[IQBarButtonItem alloc] initWithImage:nil style:UIBarButtonItemStylePlain target:nil action:nil]; - _previousBarButton.accessibilityLabel = @"Toolbar Previous Button"; + _previousBarButton.accessibilityLabel = @"Previous"; } return _previousBarButton; @@ -112,7 +101,7 @@ if (_nextBarButton == nil) { _nextBarButton = [[IQBarButtonItem alloc] initWithImage:nil style:UIBarButtonItemStylePlain target:nil action:nil]; - _nextBarButton.accessibilityLabel = @"Toolbar Next Button"; + _nextBarButton.accessibilityLabel = @"Next"; } return _nextBarButton; @@ -123,7 +112,7 @@ if (_titleBarButton == nil) { _titleBarButton = [[IQTitleBarButtonItem alloc] initWithTitle:nil]; - _titleBarButton.accessibilityLabel = @"Toolbar Title Button"; + _titleBarButton.accessibilityLabel = @"Title"; } return _titleBarButton; @@ -134,7 +123,7 @@ if (_doneBarButton == nil) { _doneBarButton = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:nil action:nil]; - _doneBarButton.accessibilityLabel = @"Toolbar Done Button"; + _doneBarButton.accessibilityLabel = @"Done"; } return _doneBarButton; @@ -145,18 +134,14 @@ if (_fixedSpaceBarButton == nil) { _fixedSpaceBarButton = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) -#else - if (IQ_IS_IOS10_OR_GREATER) -#endif - { - [_fixedSpaceBarButton setWidth:6]; - } - else - { - [_fixedSpaceBarButton setWidth:20]; - } + { + [_fixedSpaceBarButton setWidth:6]; + } + else + { + [_fixedSpaceBarButton setWidth:20]; + } } return _fixedSpaceBarButton; @@ -171,23 +156,6 @@ return sizeThatFit; } --(void)setBarStyle:(UIBarStyle)barStyle -{ - [super setBarStyle:barStyle]; - - if (self.titleBarButton.selectableTitleColor == nil) - { - if (barStyle == UIBarStyleDefault) - { - [self.titleBarButton.titleButton setTitleColor:[UIColor colorWithRed:0.0 green:0.5 blue:1.0 alpha:1.0] forState:UIControlStateNormal]; - } - else - { - [self.titleBarButton.titleButton setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal]; - } - } -} - -(void)setTintColor:(UIColor *)tintColor { [super setTintColor:tintColor]; @@ -202,12 +170,8 @@ { [super layoutSubviews]; - //If running on Xcode9 (iOS11) only then we'll validate for iOS version, otherwise for older versions of Xcode (iOS10 and below) we'll just execute the tweak -#ifdef __IPHONE_11_0 if (@available(iOS 11.0, *)) {} - else -#endif - { + else { CGRect leftRect = CGRectNull; CGRect rightRect = CGRectNull; diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.h b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.h index eb1dc42..660b562 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.h +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.h @@ -28,9 +28,9 @@ @interface IQBarButtonItemConfiguration : NSObject --(instancetype)initWithBarButtonSystemItem:(UIBarButtonSystemItem)barButtonSystemItem action:(nullable SEL)action; --(instancetype)initWithImage:(nonnull UIImage*)image action:(nullable SEL)action; --(instancetype)initWithTitle:(nonnull NSString*)title action:(nullable SEL)action; +-(nonnull instancetype)initWithBarButtonSystemItem:(UIBarButtonSystemItem)barButtonSystemItem action:(nullable SEL)action; +-(nonnull instancetype)initWithImage:(nonnull UIImage*)image action:(nullable SEL)action; +-(nonnull instancetype)initWithTitle:(nonnull NSString*)title action:(nullable SEL)action; @property (readonly, nonatomic) UIBarButtonSystemItem barButtonSystemItem; //System Item to be used to instantiate bar button @property (readonly, nonatomic, nullable) UIImage *image; //Image to show on bar button item if it's not a system item. @@ -41,13 +41,13 @@ @interface UIImage (IQKeyboardToolbarNextPreviousImage) -+(UIImage*)keyboardPreviousiOS9Image; -+(UIImage*)keyboardNextiOS9Image; -+(UIImage*)keyboardPreviousiOS10Image; -+(UIImage*)keyboardNextiOS10Image; ++(nullable UIImage*)keyboardPreviousiOS9Image; ++(nullable UIImage*)keyboardNextiOS9Image; ++(nullable UIImage*)keyboardPreviousiOS10Image; ++(nullable UIImage*)keyboardNextiOS10Image; -+(UIImage*)keyboardPreviousImage; -+(UIImage*)keyboardNextImage; ++(nullable UIImage*)keyboardPreviousImage; ++(nullable UIImage*)keyboardNextImage; @end @@ -69,19 +69,16 @@ If `shouldHideToolbarPlaceholder` is YES, then title will not be added to the toolbar. Default to NO. */ @property (assign, nonatomic) BOOL shouldHideToolbarPlaceholder; -@property (assign, nonatomic) BOOL shouldHidePlaceholderText __attribute__((deprecated("This is renamed to `shouldHideToolbarPlaceholder` for more clear naming."))); /** `toolbarPlaceholder` to override default `placeholder` text when drawing text on toolbar. */ @property (nullable, strong, nonatomic) NSString* toolbarPlaceholder; -@property (nullable, strong, nonatomic) NSString* placeholderText __attribute__((deprecated("This is renamed to `toolbarPlaceholder` for more clear naming."))); /** `drawingToolbarPlaceholder` will be actual text used to draw on toolbar. This would either `placeholder` or `toolbarPlaceholder`. */ @property (nullable, strong, nonatomic, readonly) NSString* drawingToolbarPlaceholder; -@property (nullable, strong, nonatomic, readonly) NSString* drawingPlaceholderText __attribute__((deprecated("This is renamed to `drawingToolbarPlaceholder` for more clear naming."))); ///------------- /// MARK: Common diff --git a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.m b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.m index 8ab0d97..d84a229 100755 --- a/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.m +++ b/Ifish/controllers/HotBar/Lib/IQKeyboardManager/IQToolbar/IQUIView+IQKeyboardToolbar.m @@ -87,16 +87,12 @@ keyboardPreviousiOS9Image = [UIImage imageNamed:@"IQButtonBarArrowLeft" inBundle:resourcesBundle compatibleWithTraitCollection:nil];; //Support for RTL languages like Arabic, Persia etc... (Bug ID: #448) -#ifdef __IPHONE_11_0 if (@available(iOS 9.0, *)) { -#endif if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)]) { keyboardPreviousiOS9Image = [keyboardPreviousiOS9Image imageFlippedForRightToLeftLayoutDirection]; } -#ifdef __IPHONE_11_0 } -#endif } return keyboardPreviousiOS9Image; @@ -121,16 +117,12 @@ keyboardNextiOS9Image = [UIImage imageNamed:@"IQButtonBarArrowRight" inBundle:resourcesBundle compatibleWithTraitCollection:nil]; //Support for RTL languages like Arabic, Persia etc... (Bug ID: #448) -#ifdef __IPHONE_11_0 if (@available(iOS 9.0, *)) { -#endif if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)]) { keyboardNextiOS9Image = [keyboardNextiOS9Image imageFlippedForRightToLeftLayoutDirection]; } -#ifdef __IPHONE_11_0 } -#endif } return keyboardNextiOS9Image; @@ -155,16 +147,12 @@ keyboardPreviousiOS10Image = [UIImage imageNamed:@"IQButtonBarArrowUp" inBundle:resourcesBundle compatibleWithTraitCollection:nil]; //Support for RTL languages like Arabic, Persia etc... (Bug ID: #448) -#ifdef __IPHONE_11_0 if (@available(iOS 9.0, *)) { -#endif if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)]) { keyboardPreviousiOS10Image = [keyboardPreviousiOS10Image imageFlippedForRightToLeftLayoutDirection]; } -#ifdef __IPHONE_11_0 } -#endif } return keyboardPreviousiOS10Image; @@ -189,16 +177,12 @@ keyboardNextiOS10Image = [UIImage imageNamed:@"IQButtonBarArrowDown" inBundle:resourcesBundle compatibleWithTraitCollection:nil]; //Support for RTL languages like Arabic, Persia etc... (Bug ID: #448) -#ifdef __IPHONE_11_0 if (@available(iOS 9.0, *)) { -#endif if ([UIImage instancesRespondToSelector:@selector(imageFlippedForRightToLeftLayoutDirection)]) { keyboardNextiOS10Image = [keyboardNextiOS10Image imageFlippedForRightToLeftLayoutDirection]; } -#ifdef __IPHONE_11_0 } -#endif } return keyboardNextiOS10Image; @@ -206,11 +190,7 @@ +(UIImage*)keyboardPreviousImage { -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) -#else - if (IQ_IS_IOS10_OR_GREATER) -#endif { return [UIImage keyboardPreviousiOS10Image]; } @@ -222,11 +202,7 @@ +(UIImage*)keyboardNextImage { -#ifdef __IPHONE_11_0 if (@available(iOS 10.0, *)) -#else - if (IQ_IS_IOS10_OR_GREATER) -#endif { return [UIImage keyboardNextiOS10Image]; } @@ -277,16 +253,6 @@ return [shouldHideToolbarPlaceholder boolValue]; } --(void)setShouldHidePlaceholderText:(BOOL)shouldHidePlaceholderText -{ - [self setShouldHideToolbarPlaceholder:shouldHidePlaceholderText]; -} - --(BOOL)shouldHidePlaceholderText -{ - return [self shouldHideToolbarPlaceholder]; -} - -(void)setToolbarPlaceholder:(NSString *)toolbarPlaceholder { objc_setAssociatedObject(self, @selector(toolbarPlaceholder), toolbarPlaceholder, OBJC_ASSOCIATION_RETAIN_NONATOMIC); @@ -300,16 +266,6 @@ return toolbarPlaceholder; } --(void)setPlaceholderText:(NSString*)placeholderText -{ - [self setToolbarPlaceholder:placeholderText]; -} - --(NSString*)placeholderText -{ - return [self toolbarPlaceholder]; -} - -(NSString *)drawingToolbarPlaceholder { if (self.shouldHideToolbarPlaceholder) @@ -330,11 +286,6 @@ } } --(NSString*)drawingPlaceholderText -{ - return [self drawingToolbarPlaceholder]; -} - #pragma mark - Private helper +(IQBarButtonItem*)flexibleBarButtonItem @@ -377,6 +328,8 @@ prev = [[IQBarButtonItem alloc] initWithImage:previousBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:previousBarButtonConfiguration.action]; prev.invocation = toolbar.previousBarButton.invocation; prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel; + prev.enabled = toolbar.previousBarButton.enabled; + prev.tag = toolbar.previousBarButton.tag; toolbar.previousBarButton = prev; } else if (previousBarButtonConfiguration.title) @@ -384,6 +337,8 @@ prev = [[IQBarButtonItem alloc] initWithTitle:previousBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:previousBarButtonConfiguration.action]; prev.invocation = toolbar.previousBarButton.invocation; prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel; + prev.enabled = toolbar.previousBarButton.enabled; + prev.tag = toolbar.previousBarButton.tag; toolbar.previousBarButton = prev; } else @@ -391,6 +346,8 @@ prev = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:previousBarButtonConfiguration.barButtonSystemItem target:target action:previousBarButtonConfiguration.action]; prev.invocation = toolbar.previousBarButton.invocation; prev.accessibilityLabel = toolbar.previousBarButton.accessibilityLabel; + prev.enabled = toolbar.previousBarButton.enabled; + prev.tag = toolbar.previousBarButton.tag; toolbar.previousBarButton = prev; } @@ -418,6 +375,8 @@ next = [[IQBarButtonItem alloc] initWithImage:nextBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:nextBarButtonConfiguration.action]; next.invocation = toolbar.nextBarButton.invocation; next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel; + next.enabled = toolbar.nextBarButton.enabled; + next.tag = toolbar.nextBarButton.tag; toolbar.nextBarButton = next; } else if (nextBarButtonConfiguration.title) @@ -425,6 +384,8 @@ next = [[IQBarButtonItem alloc] initWithTitle:nextBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:nextBarButtonConfiguration.action]; next.invocation = toolbar.nextBarButton.invocation; next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel; + next.enabled = toolbar.nextBarButton.enabled; + next.tag = toolbar.nextBarButton.tag; toolbar.nextBarButton = next; } else @@ -432,6 +393,8 @@ next = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:nextBarButtonConfiguration.barButtonSystemItem target:target action:nextBarButtonConfiguration.action]; next.invocation = toolbar.nextBarButton.invocation; next.accessibilityLabel = toolbar.nextBarButton.accessibilityLabel; + next.enabled = toolbar.nextBarButton.enabled; + next.tag = toolbar.nextBarButton.tag; toolbar.nextBarButton = next; } @@ -445,10 +408,8 @@ //Title button toolbar.titleBarButton.title = titleText; -#ifdef __IPHONE_11_0 if (@available(iOS 11.0, *)) {} else -#endif { toolbar.titleBarButton.customView.frame = CGRectZero; } @@ -474,6 +435,8 @@ done = [[IQBarButtonItem alloc] initWithImage:rightBarButtonConfiguration.image style:UIBarButtonItemStylePlain target:target action:rightBarButtonConfiguration.action]; done.invocation = toolbar.doneBarButton.invocation; done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel; + done.enabled = toolbar.doneBarButton.enabled; + done.tag = toolbar.doneBarButton.tag; toolbar.doneBarButton = done; } else if (rightBarButtonConfiguration.title) @@ -481,6 +444,8 @@ done = [[IQBarButtonItem alloc] initWithTitle:rightBarButtonConfiguration.title style:UIBarButtonItemStylePlain target:target action:rightBarButtonConfiguration.action]; done.invocation = toolbar.doneBarButton.invocation; done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel; + done.enabled = toolbar.doneBarButton.enabled; + done.tag = toolbar.doneBarButton.tag; toolbar.doneBarButton = done; } else @@ -488,6 +453,8 @@ done = [[IQBarButtonItem alloc] initWithBarButtonSystemItem:rightBarButtonConfiguration.barButtonSystemItem target:target action:rightBarButtonConfiguration.action]; done.invocation = toolbar.doneBarButton.invocation; done.accessibilityLabel = toolbar.doneBarButton.accessibilityLabel; + done.enabled = toolbar.doneBarButton.enabled; + done.tag = toolbar.doneBarButton.tag; toolbar.doneBarButton = done; } diff --git a/Ifish/controllers/HotBar/Views/IfishChatView.m b/Ifish/controllers/HotBar/Views/IfishChatView.m index d1d0999..d5094e0 100644 --- a/Ifish/controllers/HotBar/Views/IfishChatView.m +++ b/Ifish/controllers/HotBar/Views/IfishChatView.m @@ -68,7 +68,7 @@ Strong NSMutableArray * heaterPhArray;//流量走势 // //添加流量 // for (int i=0; i<23; i++) { // CGFloat x=(i*(Rect_Width/24)+Origin_Left); -// CGFloat y=kSizeFrom750(315); +// CGFloat y=kSizeFrom750(441); // UIView *lineView = [[UIView alloc] initWithFrame:RECT(x, y, Rect_Width/24.f, 1)]; // lineView.tag = i+100; // [self addSubview:lineView]; @@ -152,7 +152,7 @@ Strong NSMutableArray * heaterPhArray;//流量走势 for (int i=0; i @property (nonatomic,strong) UITableView *tableView; @@ -155,11 +155,10 @@ extern BOOL isfromCameraView; } self.hidesBottomBarWhenPushed = YES; - - SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init]; - wifivc.vcTitle=@"连接水族箱"; - [self.navigationController pushViewController:wifivc animated:YES]; - + ConAquarMethodVC *methodVC = InitObject(ConAquarMethodVC); +// SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init]; +// wifivc.vcTitle=@"连接水族箱"; + [self.navigationController pushViewController:methodVC animated:YES]; } break; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeHelper/Constants.h b/Ifish/controllers/IfishYooseeFile/IfishYooseeHelper/Constants.h index eecb704..efb10f9 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeHelper/Constants.h +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeHelper/Constants.h @@ -38,6 +38,7 @@ #define kUsername @"user_name"//用户名 #define kNikename @"nike_name"//昵称 #define Cache_Message @"Cache_Message" +#define Noti_WillEnterForeground @"noti_willEnterForeground" //当前版本号 #define Version_Code [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] //当前bundle版本号 @@ -191,5 +192,6 @@ typedef enum{ - +#define GW_APP_ID @"74238b2d4362821cda80379fdf50518c" +#define GW_APP_TOKEN @"826aadf87286bf357560b2c1a189c688e1ada4c149f48821d3cadf959a932cdd" diff --git a/Ifish/views/HKPieChartView/HKPieChartView.h b/Ifish/views/HKPieChartView/HKPieChartView.h new file mode 100755 index 0000000..2057987 --- /dev/null +++ b/Ifish/views/HKPieChartView/HKPieChartView.h @@ -0,0 +1,15 @@ +// +// HKPieChartView.h +// PieChart +// +// Created by hukaiyin on 16/6/20. +// Copyright © 2016年 HKY. All rights reserved. +// + +#import + +@interface HKPieChartView : UIView +@property (nonatomic, assign) BOOL inCounting; +- (void)updatePercent:(CGFloat)percent animation:(BOOL)animationed; + +@end diff --git a/Ifish/views/HKPieChartView/HKPieChartView.m b/Ifish/views/HKPieChartView/HKPieChartView.m new file mode 100755 index 0000000..629c3b3 --- /dev/null +++ b/Ifish/views/HKPieChartView/HKPieChartView.m @@ -0,0 +1,275 @@ +// +// HKPieChartView.m +// PieChart +// +// Created by hukaiyin on 16/6/20. +// Copyright © 2016年 HKY. All rights reserved. +// + +#import "HKPieChartView.h" +#define cycle_blue RGB(174, 191, 228) +#define cycle_green RGB(66, 116, 130) +@interface HKPieChartView() + +@property (nonatomic, strong) CAShapeLayer *trackLayer; +@property (nonatomic, strong) CAShapeLayer *progressLayer; +@property (nonatomic, strong) CAGradientLayer *gradientLayer; +@property (nonatomic, assign) UIColor *trackColor; +@property (nonatomic, assign) UIColor *progressColor; +@property (nonatomic, assign) CGFloat lineWidth; +@property (nonatomic, strong) UIBezierPath *path; +@property (nonatomic, assign) CGFloat percent; //饼状图显示的百分比,最大为100 +@property (nonatomic, assign) CGFloat animationDuration;//动画持续时长 +@property (nonatomic, strong) NSTimer *timer; +@property (nonatomic, strong) UIImageView *shadowImageView; +@property (nonatomic, assign) CGFloat pathWidth; +@property (nonatomic, assign) CGFloat sumSteps; +@property (nonatomic, strong) UILabel *progressLabel; + +@property (nonatomic, assign) BOOL panAnimationing; + +@end + +@implementation HKPieChartView + +#pragma mark - Life Cycle + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + [self updateUI]; + + } + return self; +} + +-(void)awakeFromNib { + [super awakeFromNib]; + [self updateUI]; +} + +- (void)updateUI { + // self.trackColor = RGB(240, 244, 251); + self.trackColor = [UIColor clearColor]; + self.progressColor = cycle_green; + self.animationDuration = 100; + self.pathWidth = self.frame.size.width - kSizeFrom750(8); + + [self shadowImageView]; + [self trackLayer]; + [self gradientLayer]; + [self loadGesture]; +} + +- (void)dealloc { + [self invalidateTimer]; +} + +- (void)removeFromSuperview { + [super removeFromSuperview]; + [self invalidateTimer]; +} + +#pragma mark - Load + +- (void)loadLayer:(CAShapeLayer *)layer WithColor:(UIColor *)color { + + CGFloat layerWidth = self.pathWidth; + CGFloat layerX = (self.bounds.size.width - layerWidth)/2; + layer.frame = CGRectMake(layerX, layerX, layerWidth, layerWidth); + layer.fillColor = [UIColor clearColor].CGColor; + layer.strokeColor = color.CGColor; + layer.lineCap = kCALineCapButt; + layer.lineWidth = self.lineWidth; + layer.path = self.path.CGPath; +} + +- (void)loadGesture { + UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(didPan:)]; + [self addGestureRecognizer:pan]; +} + +#pragma mark - Gesture Action + +- (void)didPan:(UIPanGestureRecognizer *)pan { + if (!self.panAnimationing) { + + } +} +-(void)setInCounting:(BOOL)inCounting{ + _inCounting = inCounting; +} +#pragma mark - Animation + +- (void)updatePercent:(CGFloat)percent animation:(BOOL)animationed { + self.percent = percent; + [self.progressLayer removeAllAnimations]; + + if (!animationed) { + [CATransaction begin]; + [CATransaction setDisableActions:YES]; + [CATransaction setAnimationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]]; + [CATransaction setAnimationDuration:1]; + + self.progressLayer.strokeEnd = self.percent / 100.0; + + [CATransaction commit]; + } else { + + CABasicAnimation *animation= [CABasicAnimation animationWithKeyPath:@"strokeEnd"]; + animation.fromValue = @(0.0); + animation.toValue = @(self.percent / 100.); + animation.duration = self.animationDuration * self.percent / 100; + animation.removedOnCompletion = YES; + animation.delegate = self; + animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; + + self.progressLayer.strokeEnd = self.percent / 100; + [self.progressLayer addAnimation:animation forKey:@"strokeEndAnimation"]; + } +} + +#pragma mark - CAAnimationDelegate + +- (void)animationDidStart:(CAAnimation *)anim { + self.timer = [NSTimer timerWithTimeInterval:1/60 target:self selector:@selector(timerAction) userInfo:nil repeats:YES]; + [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes]; +} + +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag { + if (flag) { + [self invalidateTimer]; + if (self.inCounting&&self.percent==0) { + self.progressLabel.text = @"未开始"; + }else + { + self.progressLabel.text = [NSString stringWithFormat:@"%.0f%%", self.percent]; + } + } +} + +- (void)timerAction { + id strokeEnd = [[_progressLayer presentationLayer] valueForKey:@"strokeEnd"]; + if (![strokeEnd isKindOfClass:[NSNumber class]]) { + return; + } + CGFloat progress = [strokeEnd floatValue]; + if (self.inCounting&&progress==0) { + self.progressLabel.text = @"未开始"; + }else + { + self.progressLabel.text = [NSString stringWithFormat:@"%0.f%%",floorf(progress * 100)]; + } +} + + +- (void)invalidateTimer { + if (!self.timer) { + return; + } + [self.timer invalidate]; + self.timer = nil; +} + +#pragma mark - Getters & Setters + +- (CAShapeLayer *)trackLayer { + if (!_trackLayer) { + _trackLayer = [CAShapeLayer layer]; + [self loadLayer:_trackLayer WithColor:self.trackColor]; + [self.layer addSublayer:_trackLayer]; + } + return _trackLayer; +} + +- (UIImageView *)shadowImageView { + if (!_shadowImageView) { + _shadowImageView = [[UIImageView alloc]initWithFrame:self.bounds]; + CGPoint center = CGPointMake(CGRectGetWidth(self.bounds)/2, CGRectGetHeight(self.bounds)/2); + + CGFloat radius = (self.frame.size.width- kSizeFrom750(8)*2)/2; + CGFloat startA = -M_PI_2; //设置进度条起点位置 + CGFloat endA =-M_PI_2+ M_PI * 2; //设置进度条终点位置 + + //获取环形路径(画一个圆形,填充色透明,设置线框宽度为10,这样就获得了一个环形) + CAShapeLayer * _backLayer = [CAShapeLayer layer];//创建一个track shape layer + _backLayer.frame = self.bounds; + _backLayer.fillColor = [[UIColor clearColor] CGColor]; //填充色为无色 + _backLayer.strokeColor = [cycle_blue CGColor]; //指定path的渲染颜色,这里可以设置任意不透明颜色-淡蓝色 + _backLayer.opacity = 1; //背景颜色的透明度 + _backLayer.lineCap = kCALineCapRound;//指定线的边缘是圆的 + _backLayer.lineWidth = kSizeFrom750(8);//线的宽度 + UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:startA endAngle:endA clockwise:YES];//上面说明过了用来构建圆 + _backLayer.path =[path CGPath]; //把path传递給layer,然后layer会处理相应的渲染,整个逻辑和CoreGraph是一致的。 + [_shadowImageView.layer addSublayer:_backLayer]; + [self addSubview:_shadowImageView]; + } + return _shadowImageView; +} + +- (CAShapeLayer *)progressLayer { + if (!_progressLayer) { + _progressLayer = [CAShapeLayer layer]; + [self loadLayer:_progressLayer WithColor:self.progressColor]; + _progressLayer.lineCap = kCALineCapRound; + _progressLayer.strokeEnd = 0; + } + return _progressLayer; +} + +- (CAGradientLayer *)gradientLayer { + if (!_gradientLayer) { + _gradientLayer = [CAGradientLayer layer]; + _gradientLayer.frame = self.bounds; + _gradientLayer.borderColor = cycle_green.CGColor; + // _gradientLayer.colors = @[(id)[UIColor cyanColor].CGColor, + // (id)[UIColor colorWithRed:0.000 green:0.502 blue:1.000 alpha:1.000].CGColor]; +// _gradientLayer.colors = @[(id)HEXCOLOR(@"#4294f8").CGColor,(id)HEXCOLOR(@"#3b82f6").CGColor]; +// [_gradientLayer setStartPoint:CGPointMake(0.5, 1.0)]; +// [_gradientLayer setEndPoint:CGPointMake(0.5, 0.0)]; + + [_gradientLayer setMask:self.progressLayer]; + [self.layer addSublayer:_gradientLayer]; + + } + return _gradientLayer; +} + +- (UILabel *)progressLabel { + if (!_progressLabel) { + _progressLabel = [[UILabel alloc]initWithFrame:self.bounds]; + _progressLabel.textColor = cycle_green; + _progressLabel.textAlignment = NSTextAlignmentCenter; + _progressLabel.font = FontSize(18); + + [self addSubview:_progressLabel]; + } + return _progressLabel; +} + +- (void)setPercent:(CGFloat)percent { + _percent = percent; + _percent = _percent > 100 ? 100 : _percent; + _percent = _percent < 0 ? 0 : _percent; +} + +- (UIBezierPath *)path { + if (!_path) { + + CGFloat halfWidth = self.pathWidth / 2; + _path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(halfWidth, halfWidth) + radius:(self.pathWidth - self.lineWidth)/2 + startAngle:-M_PI/2 + endAngle:M_PI/2*3 + clockwise:YES]; + } + return _path; +} + +- (CGFloat)lineWidth { + if (_lineWidth == 0) { + _lineWidth = kSizeFrom750(8); + } + return _lineWidth; +} + +@end