├── .gitignore ├── AlipayFinal.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── AlipayFinal.xccheckout │ └── xcuserdata │ │ └── wushuyu.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── wushuyu.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── AlipayFinal.xcscheme │ └── xcschememanagement.plist ├── AlipayFinal ├── AESCrypt-ObjC │ ├── .gitignore │ ├── AESCrypt.h │ ├── AESCrypt.m │ ├── NSData+Base64.h │ ├── NSData+Base64.m │ ├── NSData+CommonCrypto.h │ ├── NSData+CommonCrypto.m │ ├── NSString+Base64.h │ ├── NSString+Base64.m │ └── README.md ├── AlipayFinal-Info.plist ├── AlipayFinal-Prefix.pch ├── AlipayHome │ ├── AlipayHomeIconButton.h │ ├── AlipayHomeIconButton.m │ ├── AlipayHomeNVC.h │ ├── AlipayHomeNVC.m │ ├── AlipayHomeVC.h │ └── AlipayHomeVC.m ├── Base.lproj │ └── Main.storyboard ├── Discovery │ ├── DiscoveryButton.h │ ├── DiscoveryButton.m │ ├── DiscoveryNVC.h │ ├── DiscoveryNVC.m │ ├── DiscoveryTVC.h │ └── DiscoveryTVC.m ├── GesturePassword │ ├── GesturePassword.bundle │ │ └── avatar.png │ ├── GesturePasswordButton.h │ ├── GesturePasswordButton.m │ ├── GesturePasswordController.h │ ├── GesturePasswordController.m │ ├── GesturePasswordView.h │ ├── GesturePasswordView.m │ ├── TentacleView.h │ └── TentacleView.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon7.png │ │ └── icon7@2x.png │ ├── Disc_dianziquan.imageset │ │ ├── Contents.json │ │ └── dianziquan@2x.png │ ├── Disc_hongbaol.imageset │ │ ├── Contents.json │ │ └── hongbaol@2x.png │ ├── Disc_huiyuanka.imageset │ │ ├── Contents.json │ │ └── huiyuanka@2x.png │ ├── Disc_movie.imageset │ │ ├── Contents.json │ │ └── Disc_moviel@2x.png │ ├── Disc_taxi.imageset │ │ ├── Contents.json │ │ └── Disc_taxi@2x.png │ ├── Disc_xingchengdan.imageset │ │ ├── Contents.json │ │ └── xingchengdan@2x.png │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-568h@2x.png │ │ └── Default@2x.png │ ├── Wea_aixinjuanzeng.imageset │ │ ├── Contents.json │ │ └── Wea_aixinjuanzeng@2x.png │ ├── Wea_avatar.imageset │ │ ├── Contents.json │ │ └── Wea_avatar@2x.png │ ├── Wea_wodebaozhang.imageset │ │ ├── Contents.json │ │ └── Wea_wodebaozhang@2x.png │ ├── Wea_wodeyinhangka.imageset │ │ ├── Contents.json │ │ └── Wea_wodeyinhangka@2x.png │ ├── Wea_yuebao.imageset │ │ ├── Contents.json │ │ └── Wea_yuebao@2x.png │ ├── Wea_zhanghuyue.imageset │ │ ├── Contents.json │ │ └── Wea_zhanghuyue@2x.png │ ├── first.imageset │ │ ├── Contents.json │ │ ├── first.png │ │ └── first@2x.png │ └── second.imageset │ │ ├── Contents.json │ │ ├── second.png │ │ └── second@2x.png ├── Infrastructure │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── RootTabBarController.h │ ├── RootTabBarController.m │ ├── SinglePageNVC.h │ └── SinglePageNVC.m ├── Services │ ├── ServicesNVC.h │ ├── ServicesNVC.m │ ├── ServicesTVC.h │ └── ServicesTVC.m ├── Wealth │ ├── WealthNVC.h │ ├── WealthNVC.m │ ├── WealthTVC.h │ └── WealthTVC.m ├── WidgetsVC │ ├── Widgets.xib │ ├── WidgetsVC.h │ └── WidgetsVC.m ├── en.lproj │ └── InfoPlist.strings ├── main.m └── resources │ ├── AlipayHome.bundle │ ├── ap_home_top_icon_pay_new@2x.png │ ├── ap_home_top_icon_pay_new_highlight@2x.png │ ├── ap_home_top_icon_scan_new@2x.png │ └── ap_home_top_icon_scan_new_highlight@2x.png │ ├── AlipayHomeIcons.bundle │ ├── 09999976.png │ ├── 09999988.png │ ├── 09999999.png │ ├── 10000003.png │ ├── 10000004.png │ ├── 10000006.png │ ├── 10000008.png │ ├── 10000009.png │ ├── 10000011.png │ ├── 10000014.png │ ├── 10000033.png │ ├── 11000002.png │ ├── 20000032.png │ ├── 20000046.png │ ├── 20000066.png │ ├── 20000078.png │ ├── 20000094.png │ ├── 20000119.png │ ├── 20000120.png │ ├── 20000123.png │ ├── 20000130.png │ ├── 20000131.png │ ├── 20000132.png │ ├── 20000134.png │ ├── 20000150.png │ ├── 20000155.png │ ├── 20000168.png │ ├── 2013080300000698.png │ ├── 2013082800000932.png │ ├── 30000001.png │ ├── AlipayHomeIcons.plist │ ├── app_add.png │ ├── app_item_bg.png │ ├── app_item_pressed_bg.png │ └── bill_history@2x.png │ ├── Services.bundle │ ├── 09999998@2x.png │ ├── 20000032@2x.png │ ├── ABC@2x.png │ ├── BOC@2x.png │ ├── Home_appfrag_blance.png │ ├── PSBC@2x.png │ ├── SPABANK@2x.png │ └── Services.plist │ ├── splash@2x.jpg │ ├── splashR4@2x.jpg │ └── tabbed_icon.bundle │ ├── cf财富@2x.png │ ├── cf财富_sel@2x.png │ ├── fw服务窗@2x.png │ ├── fw服务窗_sel@2x.png │ ├── ts探索@2x.png │ ├── ts探索_sel@2x.png │ ├── zfb支付宝@2x.png │ └── zfb支付宝_sel@2x.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # 以'#'开始的行,被视为注释. 2 | # 忽略掉所有文件名是 foo.txt的文件. 3 | #foo.txt 4 | # 忽略所有生成的 html文件, 5 | #*.html 6 | # foo.html是手工维护的,所以例外. 7 | #!foo.html 8 | # 忽略所有.o和 .a文件. 9 | #*.[oa] 10 | #------------------ 11 | #ignore .DS_Store 12 | .DS_Store 13 | 14 | 15 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2B1BE5591A18934200E059D7 /* splash@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2B1BE5571A18934200E059D7 /* splash@2x.jpg */; }; 11 | 2B1BE55A1A18934200E059D7 /* splashR4@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 2B1BE5581A18934200E059D7 /* splashR4@2x.jpg */; }; 12 | 2B2346AB1A1678D600E72AA8 /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = 2B2346A11A1678D600E72AA8 /* .gitignore */; }; 13 | 2B2346AC1A1678D600E72AA8 /* AESCrypt.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B2346A31A1678D600E72AA8 /* AESCrypt.m */; }; 14 | 2B2346AD1A1678D600E72AA8 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B2346A51A1678D600E72AA8 /* NSData+Base64.m */; }; 15 | 2B2346AE1A1678D600E72AA8 /* NSData+CommonCrypto.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B2346A71A1678D600E72AA8 /* NSData+CommonCrypto.m */; }; 16 | 2B2346AF1A1678D600E72AA8 /* NSString+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B2346A91A1678D600E72AA8 /* NSString+Base64.m */; }; 17 | 2B2346B01A1678D600E72AA8 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 2B2346AA1A1678D600E72AA8 /* README.md */; }; 18 | 2B4BFB7B1A152E4000C25085 /* AlipayHomeIconButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB761A152E4000C25085 /* AlipayHomeIconButton.m */; }; 19 | 2B4BFB7C1A152E4000C25085 /* AlipayHomeNVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB781A152E4000C25085 /* AlipayHomeNVC.m */; }; 20 | 2B4BFB7D1A152E4000C25085 /* AlipayHomeVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB7A1A152E4000C25085 /* AlipayHomeVC.m */; }; 21 | 2B4BFB8A1A152E4A00C25085 /* DiscoveryButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB801A152E4A00C25085 /* DiscoveryButton.m */; }; 22 | 2B4BFB8B1A152E4A00C25085 /* DiscoveryNVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB821A152E4A00C25085 /* DiscoveryNVC.m */; }; 23 | 2B4BFB8C1A152E4A00C25085 /* DiscoveryTVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB841A152E4A00C25085 /* DiscoveryTVC.m */; }; 24 | 2B4BFB961A152E5100C25085 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB911A152E5100C25085 /* AppDelegate.m */; }; 25 | 2B4BFB971A152E5100C25085 /* RootTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB931A152E5100C25085 /* RootTabBarController.m */; }; 26 | 2B4BFB981A152E5100C25085 /* SinglePageNVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFB951A152E5100C25085 /* SinglePageNVC.m */; }; 27 | 2B4BFB9E1A152E6000C25085 /* AlipayHome.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFB9A1A152E5F00C25085 /* AlipayHome.bundle */; }; 28 | 2B4BFB9F1A152E6000C25085 /* AlipayHomeIcons.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFB9B1A152E5F00C25085 /* AlipayHomeIcons.bundle */; }; 29 | 2B4BFBA01A152E6000C25085 /* Services.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFB9C1A152E5F00C25085 /* Services.bundle */; }; 30 | 2B4BFBA11A152E6000C25085 /* tabbed_icon.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFB9D1A152E5F00C25085 /* tabbed_icon.bundle */; }; 31 | 2B4BFBA71A152E6400C25085 /* ServicesNVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFBA41A152E6400C25085 /* ServicesNVC.m */; }; 32 | 2B4BFBA81A152E6400C25085 /* ServicesTVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFBA61A152E6400C25085 /* ServicesTVC.m */; }; 33 | 2B4BFBB91A152E6E00C25085 /* WealthNVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFBB01A152E6E00C25085 /* WealthNVC.m */; }; 34 | 2B4BFBBA1A152E6E00C25085 /* WealthTVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFBB21A152E6E00C25085 /* WealthTVC.m */; }; 35 | 2B4BFBBB1A152E6E00C25085 /* WidgetsVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B4BFBB51A152E6E00C25085 /* WidgetsVC.m */; }; 36 | 2B4BFBBE1A152EEC00C25085 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFBBC1A152EEC00C25085 /* Main.storyboard */; }; 37 | 2B4BFBC01A152F4600C25085 /* Widgets.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFBBF1A152F4600C25085 /* Widgets.xib */; }; 38 | 2B4BFBC21A152F6000C25085 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B4BFBC11A152F6000C25085 /* Images.xcassets */; }; 39 | 2B84AAD01A1219980098E502 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B84AACF1A1219980098E502 /* Foundation.framework */; }; 40 | 2B84AAD41A1219980098E502 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B84AAD31A1219980098E502 /* UIKit.framework */; }; 41 | 2BAC42F41A15325100AD190F /* AlipayFinal-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2BAC42F11A15325100AD190F /* AlipayFinal-Info.plist */; }; 42 | 2BAC42F51A15325100AD190F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BAC42F31A15325100AD190F /* main.m */; }; 43 | 2BAC430A1A153AFB00AD190F /* GesturePassword.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2BAC42FE1A153AFB00AD190F /* GesturePassword.bundle */; }; 44 | 2BAC430B1A153AFB00AD190F /* GesturePasswordButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BAC43001A153AFB00AD190F /* GesturePasswordButton.m */; }; 45 | 2BAC430C1A153AFB00AD190F /* GesturePasswordController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BAC43021A153AFB00AD190F /* GesturePasswordController.m */; }; 46 | 2BAC430D1A153AFB00AD190F /* GesturePasswordView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BAC43041A153AFB00AD190F /* GesturePasswordView.m */; }; 47 | 2BAC430F1A153AFB00AD190F /* TentacleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2BAC43091A153AFB00AD190F /* TentacleView.m */; }; 48 | 2BBAC1471A13FC180062B6F3 /* CoreImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BBAC1461A13FC180062B6F3 /* CoreImage.framework */; }; 49 | 2BEB6C021A16062F003C2B91 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BEB6C011A16062F003C2B91 /* Security.framework */; }; 50 | /* End PBXBuildFile section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | 2B1BE5571A18934200E059D7 /* splash@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "splash@2x.jpg"; sourceTree = ""; }; 54 | 2B1BE5581A18934200E059D7 /* splashR4@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "splashR4@2x.jpg"; sourceTree = ""; }; 55 | 2B2346A11A1678D600E72AA8 /* .gitignore */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitignore; sourceTree = ""; }; 56 | 2B2346A21A1678D600E72AA8 /* AESCrypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AESCrypt.h; sourceTree = ""; }; 57 | 2B2346A31A1678D600E72AA8 /* AESCrypt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AESCrypt.m; sourceTree = ""; }; 58 | 2B2346A41A1678D600E72AA8 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = ""; }; 59 | 2B2346A51A1678D600E72AA8 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = ""; }; 60 | 2B2346A61A1678D600E72AA8 /* NSData+CommonCrypto.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+CommonCrypto.h"; sourceTree = ""; }; 61 | 2B2346A71A1678D600E72AA8 /* NSData+CommonCrypto.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+CommonCrypto.m"; sourceTree = ""; }; 62 | 2B2346A81A1678D600E72AA8 /* NSString+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+Base64.h"; sourceTree = ""; }; 63 | 2B2346A91A1678D600E72AA8 /* NSString+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+Base64.m"; sourceTree = ""; }; 64 | 2B2346AA1A1678D600E72AA8 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 65 | 2B4BFB751A152E4000C25085 /* AlipayHomeIconButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlipayHomeIconButton.h; sourceTree = ""; }; 66 | 2B4BFB761A152E4000C25085 /* AlipayHomeIconButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlipayHomeIconButton.m; sourceTree = ""; }; 67 | 2B4BFB771A152E4000C25085 /* AlipayHomeNVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlipayHomeNVC.h; sourceTree = ""; }; 68 | 2B4BFB781A152E4000C25085 /* AlipayHomeNVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlipayHomeNVC.m; sourceTree = ""; }; 69 | 2B4BFB791A152E4000C25085 /* AlipayHomeVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlipayHomeVC.h; sourceTree = ""; }; 70 | 2B4BFB7A1A152E4000C25085 /* AlipayHomeVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlipayHomeVC.m; sourceTree = ""; }; 71 | 2B4BFB7F1A152E4A00C25085 /* DiscoveryButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiscoveryButton.h; sourceTree = ""; }; 72 | 2B4BFB801A152E4A00C25085 /* DiscoveryButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiscoveryButton.m; sourceTree = ""; }; 73 | 2B4BFB811A152E4A00C25085 /* DiscoveryNVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiscoveryNVC.h; sourceTree = ""; }; 74 | 2B4BFB821A152E4A00C25085 /* DiscoveryNVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiscoveryNVC.m; sourceTree = ""; }; 75 | 2B4BFB831A152E4A00C25085 /* DiscoveryTVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiscoveryTVC.h; sourceTree = ""; }; 76 | 2B4BFB841A152E4A00C25085 /* DiscoveryTVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiscoveryTVC.m; sourceTree = ""; }; 77 | 2B4BFB901A152E5100C25085 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 78 | 2B4BFB911A152E5100C25085 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 79 | 2B4BFB921A152E5100C25085 /* RootTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootTabBarController.h; sourceTree = ""; }; 80 | 2B4BFB931A152E5100C25085 /* RootTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootTabBarController.m; sourceTree = ""; }; 81 | 2B4BFB941A152E5100C25085 /* SinglePageNVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SinglePageNVC.h; sourceTree = ""; }; 82 | 2B4BFB951A152E5100C25085 /* SinglePageNVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SinglePageNVC.m; sourceTree = ""; }; 83 | 2B4BFB9A1A152E5F00C25085 /* AlipayHome.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = AlipayHome.bundle; sourceTree = ""; }; 84 | 2B4BFB9B1A152E5F00C25085 /* AlipayHomeIcons.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = AlipayHomeIcons.bundle; sourceTree = ""; }; 85 | 2B4BFB9C1A152E5F00C25085 /* Services.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Services.bundle; sourceTree = ""; }; 86 | 2B4BFB9D1A152E5F00C25085 /* tabbed_icon.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = tabbed_icon.bundle; sourceTree = ""; }; 87 | 2B4BFBA31A152E6400C25085 /* ServicesNVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServicesNVC.h; sourceTree = ""; }; 88 | 2B4BFBA41A152E6400C25085 /* ServicesNVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServicesNVC.m; sourceTree = ""; }; 89 | 2B4BFBA51A152E6400C25085 /* ServicesTVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServicesTVC.h; sourceTree = ""; }; 90 | 2B4BFBA61A152E6400C25085 /* ServicesTVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServicesTVC.m; sourceTree = ""; }; 91 | 2B4BFBAF1A152E6E00C25085 /* WealthNVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WealthNVC.h; sourceTree = ""; }; 92 | 2B4BFBB01A152E6E00C25085 /* WealthNVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WealthNVC.m; sourceTree = ""; }; 93 | 2B4BFBB11A152E6E00C25085 /* WealthTVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WealthTVC.h; sourceTree = ""; }; 94 | 2B4BFBB21A152E6E00C25085 /* WealthTVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WealthTVC.m; sourceTree = ""; }; 95 | 2B4BFBB41A152E6E00C25085 /* WidgetsVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WidgetsVC.h; sourceTree = ""; }; 96 | 2B4BFBB51A152E6E00C25085 /* WidgetsVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WidgetsVC.m; sourceTree = ""; }; 97 | 2B4BFBBD1A152EEC00C25085 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = AlipayFinal/Base.lproj/Main.storyboard; sourceTree = SOURCE_ROOT; }; 98 | 2B4BFBBF1A152F4600C25085 /* Widgets.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Widgets.xib; sourceTree = ""; }; 99 | 2B4BFBC11A152F6000C25085 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AlipayFinal/Images.xcassets; sourceTree = SOURCE_ROOT; }; 100 | 2B84AACC1A1219980098E502 /* Alipay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Alipay.app; sourceTree = BUILT_PRODUCTS_DIR; }; 101 | 2B84AACF1A1219980098E502 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 102 | 2B84AAD11A1219980098E502 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 103 | 2B84AAD31A1219980098E502 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 104 | 2BAC42F11A15325100AD190F /* AlipayFinal-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "AlipayFinal-Info.plist"; path = "AlipayFinal/AlipayFinal-Info.plist"; sourceTree = SOURCE_ROOT; }; 105 | 2BAC42F21A15325100AD190F /* AlipayFinal-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "AlipayFinal-Prefix.pch"; path = "AlipayFinal/AlipayFinal-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 106 | 2BAC42F31A15325100AD190F /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AlipayFinal/main.m; sourceTree = SOURCE_ROOT; }; 107 | 2BAC42FE1A153AFB00AD190F /* GesturePassword.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = GesturePassword.bundle; sourceTree = ""; }; 108 | 2BAC42FF1A153AFB00AD190F /* GesturePasswordButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GesturePasswordButton.h; sourceTree = ""; }; 109 | 2BAC43001A153AFB00AD190F /* GesturePasswordButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GesturePasswordButton.m; sourceTree = ""; }; 110 | 2BAC43011A153AFB00AD190F /* GesturePasswordController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GesturePasswordController.h; sourceTree = ""; }; 111 | 2BAC43021A153AFB00AD190F /* GesturePasswordController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GesturePasswordController.m; sourceTree = ""; }; 112 | 2BAC43031A153AFB00AD190F /* GesturePasswordView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GesturePasswordView.h; sourceTree = ""; }; 113 | 2BAC43041A153AFB00AD190F /* GesturePasswordView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GesturePasswordView.m; sourceTree = ""; }; 114 | 2BAC43081A153AFB00AD190F /* TentacleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TentacleView.h; sourceTree = ""; }; 115 | 2BAC43091A153AFB00AD190F /* TentacleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TentacleView.m; sourceTree = ""; }; 116 | 2BBAC1441A13FAB30062B6F3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 117 | 2BBAC1461A13FC180062B6F3 /* CoreImage.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreImage.framework; path = System/Library/Frameworks/CoreImage.framework; sourceTree = SDKROOT; }; 118 | 2BEB6C011A16062F003C2B91 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 119 | /* End PBXFileReference section */ 120 | 121 | /* Begin PBXFrameworksBuildPhase section */ 122 | 2B84AAC91A1219980098E502 /* Frameworks */ = { 123 | isa = PBXFrameworksBuildPhase; 124 | buildActionMask = 2147483647; 125 | files = ( 126 | 2BEB6C021A16062F003C2B91 /* Security.framework in Frameworks */, 127 | 2BBAC1471A13FC180062B6F3 /* CoreImage.framework in Frameworks */, 128 | 2B84AAD41A1219980098E502 /* UIKit.framework in Frameworks */, 129 | 2B84AAD01A1219980098E502 /* Foundation.framework in Frameworks */, 130 | ); 131 | runOnlyForDeploymentPostprocessing = 0; 132 | }; 133 | /* End PBXFrameworksBuildPhase section */ 134 | 135 | /* Begin PBXGroup section */ 136 | 2B2346A01A1678D600E72AA8 /* AESCrypt-ObjC */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 2B2346A11A1678D600E72AA8 /* .gitignore */, 140 | 2B2346A21A1678D600E72AA8 /* AESCrypt.h */, 141 | 2B2346A31A1678D600E72AA8 /* AESCrypt.m */, 142 | 2B2346A41A1678D600E72AA8 /* NSData+Base64.h */, 143 | 2B2346A51A1678D600E72AA8 /* NSData+Base64.m */, 144 | 2B2346A61A1678D600E72AA8 /* NSData+CommonCrypto.h */, 145 | 2B2346A71A1678D600E72AA8 /* NSData+CommonCrypto.m */, 146 | 2B2346A81A1678D600E72AA8 /* NSString+Base64.h */, 147 | 2B2346A91A1678D600E72AA8 /* NSString+Base64.m */, 148 | 2B2346AA1A1678D600E72AA8 /* README.md */, 149 | ); 150 | name = "AESCrypt-ObjC"; 151 | path = "AlipayFinal/AESCrypt-ObjC"; 152 | sourceTree = SOURCE_ROOT; 153 | }; 154 | 2B4BFB741A152E4000C25085 /* AlipayHome */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 2B4BFB751A152E4000C25085 /* AlipayHomeIconButton.h */, 158 | 2B4BFB761A152E4000C25085 /* AlipayHomeIconButton.m */, 159 | 2B4BFB771A152E4000C25085 /* AlipayHomeNVC.h */, 160 | 2B4BFB781A152E4000C25085 /* AlipayHomeNVC.m */, 161 | 2B4BFB791A152E4000C25085 /* AlipayHomeVC.h */, 162 | 2B4BFB7A1A152E4000C25085 /* AlipayHomeVC.m */, 163 | ); 164 | name = AlipayHome; 165 | path = AlipayFinal/AlipayHome; 166 | sourceTree = SOURCE_ROOT; 167 | }; 168 | 2B4BFB7E1A152E4A00C25085 /* Discovery */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 2B4BFB7F1A152E4A00C25085 /* DiscoveryButton.h */, 172 | 2B4BFB801A152E4A00C25085 /* DiscoveryButton.m */, 173 | 2B4BFB811A152E4A00C25085 /* DiscoveryNVC.h */, 174 | 2B4BFB821A152E4A00C25085 /* DiscoveryNVC.m */, 175 | 2B4BFB831A152E4A00C25085 /* DiscoveryTVC.h */, 176 | 2B4BFB841A152E4A00C25085 /* DiscoveryTVC.m */, 177 | ); 178 | name = Discovery; 179 | path = AlipayFinal/Discovery; 180 | sourceTree = SOURCE_ROOT; 181 | }; 182 | 2B4BFB8F1A152E5100C25085 /* Infrastructure */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | 2B4BFB901A152E5100C25085 /* AppDelegate.h */, 186 | 2B4BFB911A152E5100C25085 /* AppDelegate.m */, 187 | 2B4BFB921A152E5100C25085 /* RootTabBarController.h */, 188 | 2B4BFB931A152E5100C25085 /* RootTabBarController.m */, 189 | 2B4BFB941A152E5100C25085 /* SinglePageNVC.h */, 190 | 2B4BFB951A152E5100C25085 /* SinglePageNVC.m */, 191 | ); 192 | name = Infrastructure; 193 | path = AlipayFinal/Infrastructure; 194 | sourceTree = SOURCE_ROOT; 195 | }; 196 | 2B4BFB991A152E5F00C25085 /* resources */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | 2B1BE5571A18934200E059D7 /* splash@2x.jpg */, 200 | 2B1BE5581A18934200E059D7 /* splashR4@2x.jpg */, 201 | 2B4BFB9A1A152E5F00C25085 /* AlipayHome.bundle */, 202 | 2B4BFB9B1A152E5F00C25085 /* AlipayHomeIcons.bundle */, 203 | 2B4BFB9C1A152E5F00C25085 /* Services.bundle */, 204 | 2B4BFB9D1A152E5F00C25085 /* tabbed_icon.bundle */, 205 | ); 206 | name = resources; 207 | path = AlipayFinal/resources; 208 | sourceTree = SOURCE_ROOT; 209 | }; 210 | 2B4BFBA21A152E6400C25085 /* Services */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 2B4BFBA31A152E6400C25085 /* ServicesNVC.h */, 214 | 2B4BFBA41A152E6400C25085 /* ServicesNVC.m */, 215 | 2B4BFBA51A152E6400C25085 /* ServicesTVC.h */, 216 | 2B4BFBA61A152E6400C25085 /* ServicesTVC.m */, 217 | ); 218 | name = Services; 219 | path = AlipayFinal/Services; 220 | sourceTree = SOURCE_ROOT; 221 | }; 222 | 2B4BFBAE1A152E6E00C25085 /* Wealth */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 2B4BFBAF1A152E6E00C25085 /* WealthNVC.h */, 226 | 2B4BFBB01A152E6E00C25085 /* WealthNVC.m */, 227 | 2B4BFBB11A152E6E00C25085 /* WealthTVC.h */, 228 | 2B4BFBB21A152E6E00C25085 /* WealthTVC.m */, 229 | ); 230 | name = Wealth; 231 | path = AlipayFinal/Wealth; 232 | sourceTree = SOURCE_ROOT; 233 | }; 234 | 2B4BFBB31A152E6E00C25085 /* WidgetsVC */ = { 235 | isa = PBXGroup; 236 | children = ( 237 | 2B4BFBBF1A152F4600C25085 /* Widgets.xib */, 238 | 2B4BFBB41A152E6E00C25085 /* WidgetsVC.h */, 239 | 2B4BFBB51A152E6E00C25085 /* WidgetsVC.m */, 240 | ); 241 | name = WidgetsVC; 242 | path = AlipayFinal/WidgetsVC; 243 | sourceTree = SOURCE_ROOT; 244 | }; 245 | 2B84AAC31A1219980098E502 = { 246 | isa = PBXGroup; 247 | children = ( 248 | 2B84AAD51A1219980098E502 /* AlipayFinal */, 249 | 2B84AACE1A1219980098E502 /* Frameworks */, 250 | 2B84AACD1A1219980098E502 /* Products */, 251 | ); 252 | sourceTree = ""; 253 | }; 254 | 2B84AACD1A1219980098E502 /* Products */ = { 255 | isa = PBXGroup; 256 | children = ( 257 | 2B84AACC1A1219980098E502 /* Alipay.app */, 258 | ); 259 | name = Products; 260 | sourceTree = ""; 261 | }; 262 | 2B84AACE1A1219980098E502 /* Frameworks */ = { 263 | isa = PBXGroup; 264 | children = ( 265 | 2BEB6C011A16062F003C2B91 /* Security.framework */, 266 | 2BBAC1461A13FC180062B6F3 /* CoreImage.framework */, 267 | 2BBAC1441A13FAB30062B6F3 /* QuartzCore.framework */, 268 | 2B84AACF1A1219980098E502 /* Foundation.framework */, 269 | 2B84AAD11A1219980098E502 /* CoreGraphics.framework */, 270 | 2B84AAD31A1219980098E502 /* UIKit.framework */, 271 | ); 272 | name = Frameworks; 273 | sourceTree = ""; 274 | }; 275 | 2B84AAD51A1219980098E502 /* AlipayFinal */ = { 276 | isa = PBXGroup; 277 | children = ( 278 | 2B2346A01A1678D600E72AA8 /* AESCrypt-ObjC */, 279 | 2BAC42FD1A153AFB00AD190F /* GesturePassword */, 280 | 2BAC42F61A15325B00AD190F /* Supporting Files */, 281 | 2B4BFBAE1A152E6E00C25085 /* Wealth */, 282 | 2B4BFBB31A152E6E00C25085 /* WidgetsVC */, 283 | 2B4BFBA21A152E6400C25085 /* Services */, 284 | 2B4BFB991A152E5F00C25085 /* resources */, 285 | 2B4BFB8F1A152E5100C25085 /* Infrastructure */, 286 | 2B4BFB7E1A152E4A00C25085 /* Discovery */, 287 | 2B4BFB741A152E4000C25085 /* AlipayHome */, 288 | 2B4BFBBC1A152EEC00C25085 /* Main.storyboard */, 289 | 2B4BFBC11A152F6000C25085 /* Images.xcassets */, 290 | ); 291 | name = AlipayFinal; 292 | path = stage3tabbedview; 293 | sourceTree = ""; 294 | }; 295 | 2BAC42F61A15325B00AD190F /* Supporting Files */ = { 296 | isa = PBXGroup; 297 | children = ( 298 | 2BAC42F11A15325100AD190F /* AlipayFinal-Info.plist */, 299 | 2BAC42F21A15325100AD190F /* AlipayFinal-Prefix.pch */, 300 | 2BAC42F31A15325100AD190F /* main.m */, 301 | ); 302 | name = "Supporting Files"; 303 | sourceTree = ""; 304 | }; 305 | 2BAC42FD1A153AFB00AD190F /* GesturePassword */ = { 306 | isa = PBXGroup; 307 | children = ( 308 | 2BAC42FE1A153AFB00AD190F /* GesturePassword.bundle */, 309 | 2BAC42FF1A153AFB00AD190F /* GesturePasswordButton.h */, 310 | 2BAC43001A153AFB00AD190F /* GesturePasswordButton.m */, 311 | 2BAC43011A153AFB00AD190F /* GesturePasswordController.h */, 312 | 2BAC43021A153AFB00AD190F /* GesturePasswordController.m */, 313 | 2BAC43031A153AFB00AD190F /* GesturePasswordView.h */, 314 | 2BAC43041A153AFB00AD190F /* GesturePasswordView.m */, 315 | 2BAC43081A153AFB00AD190F /* TentacleView.h */, 316 | 2BAC43091A153AFB00AD190F /* TentacleView.m */, 317 | ); 318 | name = GesturePassword; 319 | path = AlipayFinal/GesturePassword; 320 | sourceTree = SOURCE_ROOT; 321 | }; 322 | /* End PBXGroup section */ 323 | 324 | /* Begin PBXNativeTarget section */ 325 | 2B84AACB1A1219980098E502 /* AlipayFinal */ = { 326 | isa = PBXNativeTarget; 327 | buildConfigurationList = 2B84AB011A1219980098E502 /* Build configuration list for PBXNativeTarget "AlipayFinal" */; 328 | buildPhases = ( 329 | 2B84AAC81A1219980098E502 /* Sources */, 330 | 2B84AAC91A1219980098E502 /* Frameworks */, 331 | 2B84AACA1A1219980098E502 /* Resources */, 332 | ); 333 | buildRules = ( 334 | ); 335 | dependencies = ( 336 | ); 337 | name = AlipayFinal; 338 | productName = stage3tabbedview; 339 | productReference = 2B84AACC1A1219980098E502 /* Alipay.app */; 340 | productType = "com.apple.product-type.application"; 341 | }; 342 | /* End PBXNativeTarget section */ 343 | 344 | /* Begin PBXProject section */ 345 | 2B84AAC41A1219980098E502 /* Project object */ = { 346 | isa = PBXProject; 347 | attributes = { 348 | LastUpgradeCheck = 0510; 349 | ORGANIZATIONNAME = wsy.Inc; 350 | }; 351 | buildConfigurationList = 2B84AAC71A1219980098E502 /* Build configuration list for PBXProject "AlipayFinal" */; 352 | compatibilityVersion = "Xcode 3.2"; 353 | developmentRegion = English; 354 | hasScannedForEncodings = 0; 355 | knownRegions = ( 356 | en, 357 | Base, 358 | ); 359 | mainGroup = 2B84AAC31A1219980098E502; 360 | productRefGroup = 2B84AACD1A1219980098E502 /* Products */; 361 | projectDirPath = ""; 362 | projectRoot = ""; 363 | targets = ( 364 | 2B84AACB1A1219980098E502 /* AlipayFinal */, 365 | ); 366 | }; 367 | /* End PBXProject section */ 368 | 369 | /* Begin PBXResourcesBuildPhase section */ 370 | 2B84AACA1A1219980098E502 /* Resources */ = { 371 | isa = PBXResourcesBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | 2B4BFBC21A152F6000C25085 /* Images.xcassets in Resources */, 375 | 2B1BE5591A18934200E059D7 /* splash@2x.jpg in Resources */, 376 | 2B4BFBA11A152E6000C25085 /* tabbed_icon.bundle in Resources */, 377 | 2B2346B01A1678D600E72AA8 /* README.md in Resources */, 378 | 2B2346AB1A1678D600E72AA8 /* .gitignore in Resources */, 379 | 2BAC430A1A153AFB00AD190F /* GesturePassword.bundle in Resources */, 380 | 2B1BE55A1A18934200E059D7 /* splashR4@2x.jpg in Resources */, 381 | 2B4BFB9E1A152E6000C25085 /* AlipayHome.bundle in Resources */, 382 | 2BAC42F41A15325100AD190F /* AlipayFinal-Info.plist in Resources */, 383 | 2B4BFBBE1A152EEC00C25085 /* Main.storyboard in Resources */, 384 | 2B4BFBA01A152E6000C25085 /* Services.bundle in Resources */, 385 | 2B4BFB9F1A152E6000C25085 /* AlipayHomeIcons.bundle in Resources */, 386 | 2B4BFBC01A152F4600C25085 /* Widgets.xib in Resources */, 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | }; 390 | /* End PBXResourcesBuildPhase section */ 391 | 392 | /* Begin PBXSourcesBuildPhase section */ 393 | 2B84AAC81A1219980098E502 /* Sources */ = { 394 | isa = PBXSourcesBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | 2BAC430B1A153AFB00AD190F /* GesturePasswordButton.m in Sources */, 398 | 2B4BFB8A1A152E4A00C25085 /* DiscoveryButton.m in Sources */, 399 | 2B2346AE1A1678D600E72AA8 /* NSData+CommonCrypto.m in Sources */, 400 | 2B4BFBB91A152E6E00C25085 /* WealthNVC.m in Sources */, 401 | 2B4BFB8C1A152E4A00C25085 /* DiscoveryTVC.m in Sources */, 402 | 2B4BFB961A152E5100C25085 /* AppDelegate.m in Sources */, 403 | 2B4BFBBA1A152E6E00C25085 /* WealthTVC.m in Sources */, 404 | 2B4BFB7B1A152E4000C25085 /* AlipayHomeIconButton.m in Sources */, 405 | 2B4BFBBB1A152E6E00C25085 /* WidgetsVC.m in Sources */, 406 | 2B2346AF1A1678D600E72AA8 /* NSString+Base64.m in Sources */, 407 | 2B4BFB7C1A152E4000C25085 /* AlipayHomeNVC.m in Sources */, 408 | 2B4BFB8B1A152E4A00C25085 /* DiscoveryNVC.m in Sources */, 409 | 2B4BFB981A152E5100C25085 /* SinglePageNVC.m in Sources */, 410 | 2BAC42F51A15325100AD190F /* main.m in Sources */, 411 | 2B2346AC1A1678D600E72AA8 /* AESCrypt.m in Sources */, 412 | 2B4BFB971A152E5100C25085 /* RootTabBarController.m in Sources */, 413 | 2B4BFB7D1A152E4000C25085 /* AlipayHomeVC.m in Sources */, 414 | 2B4BFBA71A152E6400C25085 /* ServicesNVC.m in Sources */, 415 | 2BAC430F1A153AFB00AD190F /* TentacleView.m in Sources */, 416 | 2B2346AD1A1678D600E72AA8 /* NSData+Base64.m in Sources */, 417 | 2BAC430D1A153AFB00AD190F /* GesturePasswordView.m in Sources */, 418 | 2B4BFBA81A152E6400C25085 /* ServicesTVC.m in Sources */, 419 | 2BAC430C1A153AFB00AD190F /* GesturePasswordController.m in Sources */, 420 | ); 421 | runOnlyForDeploymentPostprocessing = 0; 422 | }; 423 | /* End PBXSourcesBuildPhase section */ 424 | 425 | /* Begin PBXVariantGroup section */ 426 | 2B4BFBBC1A152EEC00C25085 /* Main.storyboard */ = { 427 | isa = PBXVariantGroup; 428 | children = ( 429 | 2B4BFBBD1A152EEC00C25085 /* Base */, 430 | ); 431 | name = Main.storyboard; 432 | sourceTree = ""; 433 | }; 434 | /* End PBXVariantGroup section */ 435 | 436 | /* Begin XCBuildConfiguration section */ 437 | 2B84AAFF1A1219980098E502 /* Debug */ = { 438 | isa = XCBuildConfiguration; 439 | buildSettings = { 440 | ALWAYS_SEARCH_USER_PATHS = NO; 441 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 442 | CLANG_CXX_LIBRARY = "libc++"; 443 | CLANG_ENABLE_MODULES = YES; 444 | CLANG_ENABLE_OBJC_ARC = YES; 445 | CLANG_WARN_BOOL_CONVERSION = YES; 446 | CLANG_WARN_CONSTANT_CONVERSION = YES; 447 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 448 | CLANG_WARN_EMPTY_BODY = YES; 449 | CLANG_WARN_ENUM_CONVERSION = YES; 450 | CLANG_WARN_INT_CONVERSION = YES; 451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 454 | COPY_PHASE_STRIP = NO; 455 | GCC_C_LANGUAGE_STANDARD = gnu99; 456 | GCC_DYNAMIC_NO_PIC = NO; 457 | GCC_OPTIMIZATION_LEVEL = 0; 458 | GCC_PREPROCESSOR_DEFINITIONS = ( 459 | "DEBUG=1", 460 | "$(inherited)", 461 | ); 462 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 463 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 464 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 465 | GCC_WARN_UNDECLARED_SELECTOR = YES; 466 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 467 | GCC_WARN_UNUSED_FUNCTION = YES; 468 | GCC_WARN_UNUSED_VARIABLE = YES; 469 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 470 | ONLY_ACTIVE_ARCH = YES; 471 | SDKROOT = iphoneos; 472 | }; 473 | name = Debug; 474 | }; 475 | 2B84AB001A1219980098E502 /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | ALWAYS_SEARCH_USER_PATHS = NO; 479 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 480 | CLANG_CXX_LIBRARY = "libc++"; 481 | CLANG_ENABLE_MODULES = YES; 482 | CLANG_ENABLE_OBJC_ARC = YES; 483 | CLANG_WARN_BOOL_CONVERSION = YES; 484 | CLANG_WARN_CONSTANT_CONVERSION = YES; 485 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 486 | CLANG_WARN_EMPTY_BODY = YES; 487 | CLANG_WARN_ENUM_CONVERSION = YES; 488 | CLANG_WARN_INT_CONVERSION = YES; 489 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 490 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 491 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 492 | COPY_PHASE_STRIP = YES; 493 | ENABLE_NS_ASSERTIONS = NO; 494 | GCC_C_LANGUAGE_STANDARD = gnu99; 495 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 496 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 497 | GCC_WARN_UNDECLARED_SELECTOR = YES; 498 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 499 | GCC_WARN_UNUSED_FUNCTION = YES; 500 | GCC_WARN_UNUSED_VARIABLE = YES; 501 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 502 | SDKROOT = iphoneos; 503 | VALIDATE_PRODUCT = YES; 504 | }; 505 | name = Release; 506 | }; 507 | 2B84AB021A1219980098E502 /* Debug */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 511 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 512 | CODE_SIGN_ENTITLEMENTS = ""; 513 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 514 | GCC_PREFIX_HEADER = "AlipayFinal/AlipayFinal-Prefix.pch"; 515 | INFOPLIST_FILE = "AlipayFinal/AlipayFinal-Info.plist"; 516 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 517 | PRODUCT_NAME = Alipay; 518 | SKIP_INSTALL = NO; 519 | WRAPPER_EXTENSION = app; 520 | }; 521 | name = Debug; 522 | }; 523 | 2B84AB031A1219980098E502 /* Release */ = { 524 | isa = XCBuildConfiguration; 525 | buildSettings = { 526 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 527 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 528 | CODE_SIGN_ENTITLEMENTS = ""; 529 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 530 | GCC_PREFIX_HEADER = "AlipayFinal/AlipayFinal-Prefix.pch"; 531 | INFOPLIST_FILE = "AlipayFinal/AlipayFinal-Info.plist"; 532 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 533 | PRODUCT_NAME = Alipay; 534 | SKIP_INSTALL = NO; 535 | WRAPPER_EXTENSION = app; 536 | }; 537 | name = Release; 538 | }; 539 | /* End XCBuildConfiguration section */ 540 | 541 | /* Begin XCConfigurationList section */ 542 | 2B84AAC71A1219980098E502 /* Build configuration list for PBXProject "AlipayFinal" */ = { 543 | isa = XCConfigurationList; 544 | buildConfigurations = ( 545 | 2B84AAFF1A1219980098E502 /* Debug */, 546 | 2B84AB001A1219980098E502 /* Release */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | 2B84AB011A1219980098E502 /* Build configuration list for PBXNativeTarget "AlipayFinal" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | 2B84AB021A1219980098E502 /* Debug */, 555 | 2B84AB031A1219980098E502 /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | /* End XCConfigurationList section */ 561 | }; 562 | rootObject = 2B84AAC41A1219980098E502 /* Project object */; 563 | } 564 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/project.xcworkspace/xcshareddata/AlipayFinal.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | DD8BADC0-03B3-49FB-918F-0C8C522A9B96 9 | IDESourceControlProjectName 10 | AlipayFinal 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 9BC1D9D4-5344-40F7-9131-E742F0F1C3ED 14 | https://github.com/summer-wu/iOSAlipayUI.git 15 | 16 | IDESourceControlProjectPath 17 | AlipayFinal.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 9BC1D9D4-5344-40F7-9131-E742F0F1C3ED 21 | ../.. 22 | 9FC7C4FF-1612-4D40-B1C8-01049AE9A35F 23 | ../../../../AlipayFinal 24 | 25 | IDESourceControlProjectURL 26 | https://github.com/summer-wu/iOSAlipayUI.git 27 | IDESourceControlProjectVersion 28 | 110 29 | IDESourceControlProjectWCCIdentifier 30 | 9BC1D9D4-5344-40F7-9131-E742F0F1C3ED 31 | IDESourceControlProjectWCConfigurations 32 | 33 | 34 | IDESourceControlRepositoryExtensionIdentifierKey 35 | public.vcs.git 36 | IDESourceControlWCCIdentifierKey 37 | 9FC7C4FF-1612-4D40-B1C8-01049AE9A35F 38 | IDESourceControlWCCName 39 | AlipayFinal 40 | 41 | 42 | IDESourceControlRepositoryExtensionIdentifierKey 43 | public.vcs.git 44 | IDESourceControlWCCIdentifierKey 45 | 9BC1D9D4-5344-40F7-9131-E742F0F1C3ED 46 | IDESourceControlWCCName 47 | iOSAlipayUI 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/project.xcworkspace/xcuserdata/wushuyu.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal.xcodeproj/project.xcworkspace/xcuserdata/wushuyu.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/project.xcworkspace/xcuserdata/wushuyu.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/xcuserdata/wushuyu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 56 | 68 | 69 | 70 | 72 | 84 | 85 | 86 | 88 | 100 | 101 | 102 | 104 | 116 | 117 | 118 | 120 | 132 | 133 | 134 | 136 | 148 | 149 | 150 | 152 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/xcuserdata/wushuyu.xcuserdatad/xcschemes/AlipayFinal.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 53 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 71 | 72 | 81 | 82 | 88 | 89 | 90 | 91 | 92 | 93 | 99 | 100 | 106 | 107 | 108 | 109 | 111 | 112 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /AlipayFinal.xcodeproj/xcuserdata/wushuyu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AlipayFinal.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 2B4BFBC61A152FA900C25085 16 | 17 | primary 18 | 19 | 20 | 2B4BFBD31A152FAA00C25085 21 | 22 | primary 23 | 24 | 25 | 2B4BFBEC1A152FCD00C25085 26 | 27 | primary 28 | 29 | 30 | 2B84AACB1A1219980098E502 31 | 32 | primary 33 | 34 | 35 | 2B84AAEF1A1219980098E502 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | build/* 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | *.xcworkspace 12 | !default.xcworkspace 13 | xcuserdata 14 | profile 15 | *.moved-aside 16 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/AESCrypt.h: -------------------------------------------------------------------------------- 1 | // 2 | // AESCrypt.h 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh 7 | // 8 | // MIT License 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining 11 | // a copy of this software and associated documentation files (the 12 | // "Software"), to deal in the Software without restriction, including 13 | // without limitation the rights to use, copy, modify, merge, publish, 14 | // distribute, sublicense, and/or sell copies of the Software, and to 15 | // permit persons to whom the Software is furnished to do so, subject to 16 | // the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import 31 | 32 | @interface AESCrypt : NSObject 33 | 34 | + (NSString *)encrypt:(NSString *)message password:(NSString *)password; 35 | + (NSString *)decrypt:(NSString *)base64EncodedString password:(NSString *)password; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/AESCrypt.m: -------------------------------------------------------------------------------- 1 | // 2 | // AESCrypt.m 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh 7 | // 8 | // MIT License 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining 11 | // a copy of this software and associated documentation files (the 12 | // "Software"), to deal in the Software without restriction, including 13 | // without limitation the rights to use, copy, modify, merge, publish, 14 | // distribute, sublicense, and/or sell copies of the Software, and to 15 | // permit persons to whom the Software is furnished to do so, subject to 16 | // the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | 30 | #import "AESCrypt.h" 31 | 32 | #import "NSData+Base64.h" 33 | #import "NSString+Base64.h" 34 | #import "NSData+CommonCrypto.h" 35 | 36 | @implementation AESCrypt 37 | 38 | + (NSString *)encrypt:(NSString *)message password:(NSString *)password { 39 | NSData *encryptedData = [[message dataUsingEncoding:NSUTF8StringEncoding] AES256EncryptedDataUsingKey:[[password dataUsingEncoding:NSUTF8StringEncoding] SHA256Hash] error:nil]; 40 | NSString *base64EncodedString = [NSString base64StringFromData:encryptedData length:[encryptedData length]]; 41 | return base64EncodedString; 42 | } 43 | 44 | + (NSString *)decrypt:(NSString *)base64EncodedString password:(NSString *)password { 45 | NSData *encryptedData = [NSData base64DataFromString:base64EncodedString]; 46 | NSData *decryptedData = [encryptedData decryptedAES256DataUsingKey:[[password dataUsingEncoding:NSUTF8StringEncoding] SHA256Hash] error:nil]; 47 | return [[NSString alloc] initWithData:decryptedData encoding:NSUTF8StringEncoding]; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSData+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.m 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class NSString; 12 | 13 | @interface NSData (Base64Additions) 14 | 15 | + (NSData *)base64DataFromString:(NSString *)string; 16 | 17 | @end -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSData+Base64.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+Base64.h 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import "NSData+Base64.h" 10 | 11 | @implementation NSData (Base64Additions) 12 | 13 | + (NSData *)base64DataFromString:(NSString *)string { 14 | unsigned long ixtext, lentext; 15 | unsigned char ch, inbuf[4], outbuf[3]; 16 | short i, ixinbuf; 17 | Boolean flignore, flendtext = false; 18 | const unsigned char *tempcstring; 19 | NSMutableData *theData; 20 | 21 | if (string == nil) { 22 | return [NSData data]; 23 | } 24 | 25 | ixtext = 0; 26 | 27 | tempcstring = (const unsigned char *)[string UTF8String]; 28 | 29 | lentext = [string length]; 30 | 31 | theData = [NSMutableData dataWithCapacity: lentext]; 32 | 33 | ixinbuf = 0; 34 | 35 | while (true) { 36 | if (ixtext >= lentext) { 37 | break; 38 | } 39 | 40 | ch = tempcstring [ixtext++]; 41 | 42 | flignore = false; 43 | 44 | if ((ch >= 'A') && (ch <= 'Z')) { 45 | ch = ch - 'A'; 46 | } 47 | else if ((ch >= 'a') && (ch <= 'z')) { 48 | ch = ch - 'a' + 26; 49 | } 50 | else if ((ch >= '0') && (ch <= '9')) { 51 | ch = ch - '0' + 52; 52 | } 53 | else if (ch == '+') { 54 | ch = 62; 55 | } 56 | else if (ch == '=') { 57 | flendtext = true; 58 | } 59 | else if (ch == '/') { 60 | ch = 63; 61 | } 62 | else { 63 | flignore = true; 64 | } 65 | 66 | if (!flignore) { 67 | short ctcharsinbuf = 3; 68 | Boolean flbreak = false; 69 | 70 | if (flendtext) { 71 | if (ixinbuf == 0) { 72 | break; 73 | } 74 | 75 | if ((ixinbuf == 1) || (ixinbuf == 2)) { 76 | ctcharsinbuf = 1; 77 | } 78 | else { 79 | ctcharsinbuf = 2; 80 | } 81 | 82 | ixinbuf = 3; 83 | 84 | flbreak = true; 85 | } 86 | 87 | inbuf [ixinbuf++] = ch; 88 | 89 | if (ixinbuf == 4) { 90 | ixinbuf = 0; 91 | 92 | outbuf[0] = (inbuf[0] << 2) | ((inbuf[1] & 0x30) >> 4); 93 | outbuf[1] = ((inbuf[1] & 0x0F) << 4) | ((inbuf[2] & 0x3C) >> 2); 94 | outbuf[2] = ((inbuf[2] & 0x03) << 6) | (inbuf[3] & 0x3F); 95 | 96 | for (i = 0; i < ctcharsinbuf; i++) { 97 | [theData appendBytes: &outbuf[i] length: 1]; 98 | } 99 | } 100 | 101 | if (flbreak) { 102 | break; 103 | } 104 | } 105 | } 106 | 107 | return theData; 108 | } 109 | 110 | @end 111 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSData+CommonCrypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NSData+CommonCrypto.h 3 | * AQToolkit 4 | * 5 | * Created by Jim Dovey on 31/8/2008. 6 | * 7 | * Copyright (c) 2008-2009, Jim Dovey 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 14 | * Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * Redistributions in binary form must reproduce the above copyright 18 | * notice, this list of conditions and the following disclaimer in the 19 | * documentation and/or other materials provided with the distribution. 20 | * 21 | * Neither the name of this project's author nor the names of its 22 | * contributors may be used to endorse or promote products derived from 23 | * this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 28 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 31 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | */ 38 | 39 | #import 40 | #import 41 | #import 42 | #import 43 | 44 | extern NSString * const kCommonCryptoErrorDomain; 45 | 46 | @interface NSError (CommonCryptoErrorDomain) 47 | + (NSError *) errorWithCCCryptorStatus: (CCCryptorStatus) status; 48 | @end 49 | 50 | @interface NSData (CommonDigest) 51 | 52 | - (NSData *) MD2Sum; 53 | - (NSData *) MD4Sum; 54 | - (NSData *) MD5Sum; 55 | 56 | - (NSData *) SHA1Hash; 57 | - (NSData *) SHA224Hash; 58 | - (NSData *) SHA256Hash; 59 | - (NSData *) SHA384Hash; 60 | - (NSData *) SHA512Hash; 61 | 62 | @end 63 | 64 | @interface NSData (CommonCryptor) 65 | 66 | - (NSData *) AES256EncryptedDataUsingKey: (id) key error: (NSError **) error; 67 | - (NSData *) decryptedAES256DataUsingKey: (id) key error: (NSError **) error; 68 | 69 | - (NSData *) DESEncryptedDataUsingKey: (id) key error: (NSError **) error; 70 | - (NSData *) decryptedDESDataUsingKey: (id) key error: (NSError **) error; 71 | 72 | - (NSData *) CASTEncryptedDataUsingKey: (id) key error: (NSError **) error; 73 | - (NSData *) decryptedCASTDataUsingKey: (id) key error: (NSError **) error; 74 | 75 | @end 76 | 77 | @interface NSData (LowLevelCommonCryptor) 78 | 79 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 80 | key: (id) key // data or string 81 | error: (CCCryptorStatus *) error; 82 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 83 | key: (id) key // data or string 84 | options: (CCOptions) options 85 | error: (CCCryptorStatus *) error; 86 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 87 | key: (id) key // data or string 88 | initializationVector: (id) iv // data or string 89 | options: (CCOptions) options 90 | error: (CCCryptorStatus *) error; 91 | 92 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 93 | key: (id) key // data or string 94 | error: (CCCryptorStatus *) error; 95 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 96 | key: (id) key // data or string 97 | options: (CCOptions) options 98 | error: (CCCryptorStatus *) error; 99 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 100 | key: (id) key // data or string 101 | initializationVector: (id) iv // data or string 102 | options: (CCOptions) options 103 | error: (CCCryptorStatus *) error; 104 | 105 | @end 106 | 107 | @interface NSData (CommonHMAC) 108 | 109 | - (NSData *) HMACWithAlgorithm: (CCHmacAlgorithm) algorithm; 110 | - (NSData *) HMACWithAlgorithm: (CCHmacAlgorithm) algorithm key: (id) key; 111 | 112 | @end -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSData+CommonCrypto.m: -------------------------------------------------------------------------------- 1 | /* 2 | * NSData+CommonCrypto.m 3 | * AQToolkit 4 | * 5 | * Created by Jim Dovey on 31/8/2008. 6 | * 7 | * Copyright (c) 2008-2009, Jim Dovey 8 | * All rights reserved. 9 | * 10 | * Redistribution and use in source and binary forms, with or without 11 | * modification, are permitted provided that the following conditions 12 | * are met: 13 | * 14 | * Redistributions of source code must retain the above copyright notice, 15 | * this list of conditions and the following disclaimer. 16 | * 17 | * Redistributions in binary form must reproduce the above copyright 18 | * notice, this list of conditions and the following disclaimer in the 19 | * documentation and/or other materials provided with the distribution. 20 | * 21 | * Neither the name of this project's author nor the names of its 22 | * contributors may be used to endorse or promote products derived from 23 | * this software without specific prior written permission. 24 | * 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 28 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 29 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 30 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 31 | * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 32 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 33 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 34 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | * 37 | */ 38 | 39 | #import 40 | #import "NSData+CommonCrypto.h" 41 | #import 42 | #import 43 | #import 44 | 45 | NSString * const kCommonCryptoErrorDomain = @"CommonCryptoErrorDomain"; 46 | 47 | @implementation NSError (CommonCryptoErrorDomain) 48 | 49 | + (NSError *) errorWithCCCryptorStatus: (CCCryptorStatus) status 50 | { 51 | NSString * description = nil, * reason = nil; 52 | 53 | switch ( status ) 54 | { 55 | case kCCSuccess: 56 | description = NSLocalizedString(@"Success", @"Error description"); 57 | break; 58 | 59 | case kCCParamError: 60 | description = NSLocalizedString(@"Parameter Error", @"Error description"); 61 | reason = NSLocalizedString(@"Illegal parameter supplied to encryption/decryption algorithm", @"Error reason"); 62 | break; 63 | 64 | case kCCBufferTooSmall: 65 | description = NSLocalizedString(@"Buffer Too Small", @"Error description"); 66 | reason = NSLocalizedString(@"Insufficient buffer provided for specified operation", @"Error reason"); 67 | break; 68 | 69 | case kCCMemoryFailure: 70 | description = NSLocalizedString(@"Memory Failure", @"Error description"); 71 | reason = NSLocalizedString(@"Failed to allocate memory", @"Error reason"); 72 | break; 73 | 74 | case kCCAlignmentError: 75 | description = NSLocalizedString(@"Alignment Error", @"Error description"); 76 | reason = NSLocalizedString(@"Input size to encryption algorithm was not aligned correctly", @"Error reason"); 77 | break; 78 | 79 | case kCCDecodeError: 80 | description = NSLocalizedString(@"Decode Error", @"Error description"); 81 | reason = NSLocalizedString(@"Input data did not decode or decrypt correctly", @"Error reason"); 82 | break; 83 | 84 | case kCCUnimplemented: 85 | description = NSLocalizedString(@"Unimplemented Function", @"Error description"); 86 | reason = NSLocalizedString(@"Function not implemented for the current algorithm", @"Error reason"); 87 | break; 88 | 89 | default: 90 | description = NSLocalizedString(@"Unknown Error", @"Error description"); 91 | break; 92 | } 93 | 94 | NSMutableDictionary * userInfo = [[NSMutableDictionary alloc] init]; 95 | [userInfo setObject: description forKey: NSLocalizedDescriptionKey]; 96 | 97 | if ( reason != nil ) 98 | [userInfo setObject: reason forKey: NSLocalizedFailureReasonErrorKey]; 99 | 100 | NSError * result = [NSError errorWithDomain: kCommonCryptoErrorDomain code: status userInfo: userInfo]; 101 | #if !__has_feature(objc_arc) 102 | [userInfo release]; 103 | #endif 104 | 105 | return ( result ); 106 | } 107 | 108 | @end 109 | 110 | #pragma mark - 111 | 112 | @implementation NSData (CommonDigest) 113 | 114 | - (NSData *) MD2Sum 115 | { 116 | unsigned char hash[CC_MD2_DIGEST_LENGTH]; 117 | (void) CC_MD2( [self bytes], (CC_LONG)[self length], hash ); 118 | return ( [NSData dataWithBytes: hash length: CC_MD2_DIGEST_LENGTH] ); 119 | } 120 | 121 | - (NSData *) MD4Sum 122 | { 123 | unsigned char hash[CC_MD4_DIGEST_LENGTH]; 124 | (void) CC_MD4( [self bytes], (CC_LONG)[self length], hash ); 125 | return ( [NSData dataWithBytes: hash length: CC_MD4_DIGEST_LENGTH] ); 126 | } 127 | 128 | - (NSData *) MD5Sum 129 | { 130 | unsigned char hash[CC_MD5_DIGEST_LENGTH]; 131 | (void) CC_MD5( [self bytes], (CC_LONG)[self length], hash ); 132 | return ( [NSData dataWithBytes: hash length: CC_MD5_DIGEST_LENGTH] ); 133 | } 134 | 135 | - (NSData *) SHA1Hash 136 | { 137 | unsigned char hash[CC_SHA1_DIGEST_LENGTH]; 138 | (void) CC_SHA1( [self bytes], (CC_LONG)[self length], hash ); 139 | return ( [NSData dataWithBytes: hash length: CC_SHA1_DIGEST_LENGTH] ); 140 | } 141 | 142 | - (NSData *) SHA224Hash 143 | { 144 | unsigned char hash[CC_SHA224_DIGEST_LENGTH]; 145 | (void) CC_SHA224( [self bytes], (CC_LONG)[self length], hash ); 146 | return ( [NSData dataWithBytes: hash length: CC_SHA224_DIGEST_LENGTH] ); 147 | } 148 | 149 | - (NSData *) SHA256Hash 150 | { 151 | unsigned char hash[CC_SHA256_DIGEST_LENGTH]; 152 | (void) CC_SHA256( [self bytes], (CC_LONG)[self length], hash ); 153 | return ( [NSData dataWithBytes: hash length: CC_SHA256_DIGEST_LENGTH] ); 154 | } 155 | 156 | - (NSData *) SHA384Hash 157 | { 158 | unsigned char hash[CC_SHA384_DIGEST_LENGTH]; 159 | (void) CC_SHA384( [self bytes], (CC_LONG)[self length], hash ); 160 | return ( [NSData dataWithBytes: hash length: CC_SHA384_DIGEST_LENGTH] ); 161 | } 162 | 163 | - (NSData *) SHA512Hash 164 | { 165 | unsigned char hash[CC_SHA512_DIGEST_LENGTH]; 166 | (void) CC_SHA512( [self bytes], (CC_LONG)[self length], hash ); 167 | return ( [NSData dataWithBytes: hash length: CC_SHA512_DIGEST_LENGTH] ); 168 | } 169 | 170 | @end 171 | 172 | @implementation NSData (CommonCryptor) 173 | 174 | - (NSData *) AES256EncryptedDataUsingKey: (id) key error: (NSError **) error 175 | { 176 | CCCryptorStatus status = kCCSuccess; 177 | NSData * result = [self dataEncryptedUsingAlgorithm: kCCAlgorithmAES128 178 | key: key 179 | options: kCCOptionPKCS7Padding 180 | error: &status]; 181 | 182 | if ( result != nil ) 183 | return ( result ); 184 | 185 | if ( error != NULL ) 186 | *error = [NSError errorWithCCCryptorStatus: status]; 187 | 188 | return ( nil ); 189 | } 190 | 191 | - (NSData *) decryptedAES256DataUsingKey: (id) key error: (NSError **) error 192 | { 193 | CCCryptorStatus status = kCCSuccess; 194 | NSData * result = [self decryptedDataUsingAlgorithm: kCCAlgorithmAES128 195 | key: key 196 | options: kCCOptionPKCS7Padding 197 | error: &status]; 198 | 199 | if ( result != nil ) 200 | return ( result ); 201 | 202 | if ( error != NULL ) 203 | *error = [NSError errorWithCCCryptorStatus: status]; 204 | 205 | return ( nil ); 206 | } 207 | 208 | - (NSData *) DESEncryptedDataUsingKey: (id) key error: (NSError **) error 209 | { 210 | CCCryptorStatus status = kCCSuccess; 211 | NSData * result = [self dataEncryptedUsingAlgorithm: kCCAlgorithmDES 212 | key: key 213 | options: kCCOptionPKCS7Padding 214 | error: &status]; 215 | 216 | if ( result != nil ) 217 | return ( result ); 218 | 219 | if ( error != NULL ) 220 | *error = [NSError errorWithCCCryptorStatus: status]; 221 | 222 | return ( nil ); 223 | } 224 | 225 | - (NSData *) decryptedDESDataUsingKey: (id) key error: (NSError **) error 226 | { 227 | CCCryptorStatus status = kCCSuccess; 228 | NSData * result = [self decryptedDataUsingAlgorithm: kCCAlgorithmDES 229 | key: key 230 | options: kCCOptionPKCS7Padding 231 | error: &status]; 232 | 233 | if ( result != nil ) 234 | return ( result ); 235 | 236 | if ( error != NULL ) 237 | *error = [NSError errorWithCCCryptorStatus: status]; 238 | 239 | return ( nil ); 240 | } 241 | 242 | - (NSData *) CASTEncryptedDataUsingKey: (id) key error: (NSError **) error 243 | { 244 | CCCryptorStatus status = kCCSuccess; 245 | NSData * result = [self dataEncryptedUsingAlgorithm: kCCAlgorithmCAST 246 | key: key 247 | options: kCCOptionPKCS7Padding 248 | error: &status]; 249 | 250 | if ( result != nil ) 251 | return ( result ); 252 | 253 | if ( error != NULL ) 254 | *error = [NSError errorWithCCCryptorStatus: status]; 255 | 256 | return ( nil ); 257 | } 258 | 259 | - (NSData *) decryptedCASTDataUsingKey: (id) key error: (NSError **) error 260 | { 261 | CCCryptorStatus status = kCCSuccess; 262 | NSData * result = [self decryptedDataUsingAlgorithm: kCCAlgorithmCAST 263 | key: key 264 | options: kCCOptionPKCS7Padding 265 | error: &status]; 266 | 267 | if ( result != nil ) 268 | return ( result ); 269 | 270 | if ( error != NULL ) 271 | *error = [NSError errorWithCCCryptorStatus: status]; 272 | 273 | return ( nil ); 274 | } 275 | 276 | @end 277 | 278 | static void FixKeyLengths( CCAlgorithm algorithm, NSMutableData * keyData, NSMutableData * ivData ) 279 | { 280 | NSUInteger keyLength = [keyData length]; 281 | switch ( algorithm ) 282 | { 283 | case kCCAlgorithmAES128: 284 | { 285 | if ( keyLength < 16 ) 286 | { 287 | [keyData setLength: 16]; 288 | } 289 | else if ( keyLength < 24 ) 290 | { 291 | [keyData setLength: 24]; 292 | } 293 | else 294 | { 295 | [keyData setLength: 32]; 296 | } 297 | 298 | break; 299 | } 300 | 301 | case kCCAlgorithmDES: 302 | { 303 | [keyData setLength: 8]; 304 | break; 305 | } 306 | 307 | case kCCAlgorithm3DES: 308 | { 309 | [keyData setLength: 24]; 310 | break; 311 | } 312 | 313 | case kCCAlgorithmCAST: 314 | { 315 | if ( keyLength < 5 ) 316 | { 317 | [keyData setLength: 5]; 318 | } 319 | else if ( keyLength > 16 ) 320 | { 321 | [keyData setLength: 16]; 322 | } 323 | 324 | break; 325 | } 326 | 327 | case kCCAlgorithmRC4: 328 | { 329 | if ( keyLength > 512 ) 330 | [keyData setLength: 512]; 331 | break; 332 | } 333 | 334 | default: 335 | break; 336 | } 337 | 338 | [ivData setLength: [keyData length]]; 339 | } 340 | 341 | @implementation NSData (LowLevelCommonCryptor) 342 | 343 | - (NSData *) _runCryptor: (CCCryptorRef) cryptor result: (CCCryptorStatus *) status 344 | { 345 | size_t bufsize = CCCryptorGetOutputLength( cryptor, (size_t)[self length], true ); 346 | void * buf = malloc( bufsize ); 347 | size_t bufused = 0; 348 | size_t bytesTotal = 0; 349 | *status = CCCryptorUpdate( cryptor, [self bytes], (size_t)[self length], 350 | buf, bufsize, &bufused ); 351 | if ( *status != kCCSuccess ) 352 | { 353 | free( buf ); 354 | return ( nil ); 355 | } 356 | 357 | bytesTotal += bufused; 358 | 359 | // From Brent Royal-Gordon (Twitter: architechies): 360 | // Need to update buf ptr past used bytes when calling CCCryptorFinal() 361 | *status = CCCryptorFinal( cryptor, buf + bufused, bufsize - bufused, &bufused ); 362 | if ( *status != kCCSuccess ) 363 | { 364 | free( buf ); 365 | return ( nil ); 366 | } 367 | 368 | bytesTotal += bufused; 369 | 370 | return ( [NSData dataWithBytesNoCopy: buf length: bytesTotal] ); 371 | } 372 | 373 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 374 | key: (id) key 375 | error: (CCCryptorStatus *) error 376 | { 377 | return ( [self dataEncryptedUsingAlgorithm: algorithm 378 | key: key 379 | initializationVector: nil 380 | options: 0 381 | error: error] ); 382 | } 383 | 384 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 385 | key: (id) key 386 | options: (CCOptions) options 387 | error: (CCCryptorStatus *) error 388 | { 389 | return ( [self dataEncryptedUsingAlgorithm: algorithm 390 | key: key 391 | initializationVector: nil 392 | options: options 393 | error: error] ); 394 | } 395 | 396 | - (NSData *) dataEncryptedUsingAlgorithm: (CCAlgorithm) algorithm 397 | key: (id) key 398 | initializationVector: (id) iv 399 | options: (CCOptions) options 400 | error: (CCCryptorStatus *) error 401 | { 402 | CCCryptorRef cryptor = NULL; 403 | CCCryptorStatus status = kCCSuccess; 404 | 405 | NSParameterAssert([key isKindOfClass: [NSData class]] || [key isKindOfClass: [NSString class]]); 406 | NSParameterAssert(iv == nil || [iv isKindOfClass: [NSData class]] || [iv isKindOfClass: [NSString class]]); 407 | 408 | NSMutableData * keyData, * ivData; 409 | if ( [key isKindOfClass: [NSData class]] ) 410 | keyData = (NSMutableData *) [key mutableCopy]; 411 | else 412 | keyData = [[key dataUsingEncoding: NSUTF8StringEncoding] mutableCopy]; 413 | 414 | if ( [iv isKindOfClass: [NSString class]] ) 415 | ivData = [[iv dataUsingEncoding: NSUTF8StringEncoding] mutableCopy]; 416 | else 417 | ivData = (NSMutableData *) [iv mutableCopy]; // data or nil 418 | 419 | #if !__has_feature(objc_arc) 420 | [keyData autorelease]; 421 | [ivData autorelease]; 422 | #endif 423 | // ensure correct lengths for key and iv data, based on algorithms 424 | FixKeyLengths( algorithm, keyData, ivData ); 425 | 426 | status = CCCryptorCreate( kCCEncrypt, algorithm, options, 427 | [keyData bytes], [keyData length], [ivData bytes], 428 | &cryptor ); 429 | 430 | if ( status != kCCSuccess ) 431 | { 432 | if ( error != NULL ) 433 | *error = status; 434 | return ( nil ); 435 | } 436 | 437 | NSData * result = [self _runCryptor: cryptor result: &status]; 438 | if ( (result == nil) && (error != NULL) ) 439 | *error = status; 440 | 441 | CCCryptorRelease( cryptor ); 442 | 443 | return ( result ); 444 | } 445 | 446 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 447 | key: (id) key // data or string 448 | error: (CCCryptorStatus *) error 449 | { 450 | return ( [self decryptedDataUsingAlgorithm: algorithm 451 | key: key 452 | initializationVector: nil 453 | options: 0 454 | error: error] ); 455 | } 456 | 457 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 458 | key: (id) key // data or string 459 | options: (CCOptions) options 460 | error: (CCCryptorStatus *) error 461 | { 462 | return ( [self decryptedDataUsingAlgorithm: algorithm 463 | key: key 464 | initializationVector: nil 465 | options: options 466 | error: error] ); 467 | } 468 | 469 | - (NSData *) decryptedDataUsingAlgorithm: (CCAlgorithm) algorithm 470 | key: (id) key // data or string 471 | initializationVector: (id) iv // data or string 472 | options: (CCOptions) options 473 | error: (CCCryptorStatus *) error 474 | { 475 | CCCryptorRef cryptor = NULL; 476 | CCCryptorStatus status = kCCSuccess; 477 | 478 | NSParameterAssert([key isKindOfClass: [NSData class]] || [key isKindOfClass: [NSString class]]); 479 | NSParameterAssert(iv == nil || [iv isKindOfClass: [NSData class]] || [iv isKindOfClass: [NSString class]]); 480 | 481 | NSMutableData * keyData, * ivData; 482 | if ( [key isKindOfClass: [NSData class]] ) 483 | keyData = (NSMutableData *) [key mutableCopy]; 484 | else 485 | keyData = [[key dataUsingEncoding: NSUTF8StringEncoding] mutableCopy]; 486 | 487 | if ( [iv isKindOfClass: [NSString class]] ) 488 | ivData = [[iv dataUsingEncoding: NSUTF8StringEncoding] mutableCopy]; 489 | else 490 | ivData = (NSMutableData *) [iv mutableCopy]; // data or nil 491 | 492 | #if !__has_feature(objc_arc) 493 | [keyData autorelease]; 494 | [ivData autorelease]; 495 | #endif 496 | 497 | // ensure correct lengths for key and iv data, based on algorithms 498 | FixKeyLengths( algorithm, keyData, ivData ); 499 | 500 | status = CCCryptorCreate( kCCDecrypt, algorithm, options, 501 | [keyData bytes], [keyData length], [ivData bytes], 502 | &cryptor ); 503 | 504 | if ( status != kCCSuccess ) 505 | { 506 | if ( error != NULL ) 507 | *error = status; 508 | return ( nil ); 509 | } 510 | 511 | NSData * result = [self _runCryptor: cryptor result: &status]; 512 | if ( (result == nil) && (error != NULL) ) 513 | *error = status; 514 | 515 | CCCryptorRelease( cryptor ); 516 | 517 | return ( result ); 518 | } 519 | 520 | @end 521 | 522 | @implementation NSData (CommonHMAC) 523 | 524 | - (NSData *) HMACWithAlgorithm: (CCHmacAlgorithm) algorithm 525 | { 526 | return ( [self HMACWithAlgorithm: algorithm key: nil] ); 527 | } 528 | 529 | - (NSData *) HMACWithAlgorithm: (CCHmacAlgorithm) algorithm key: (id) key 530 | { 531 | NSParameterAssert(key == nil || [key isKindOfClass: [NSData class]] || [key isKindOfClass: [NSString class]]); 532 | 533 | NSData * keyData = nil; 534 | if ( [key isKindOfClass: [NSString class]] ) 535 | keyData = [key dataUsingEncoding: NSUTF8StringEncoding]; 536 | else 537 | keyData = (NSData *) key; 538 | 539 | // this could be either CC_SHA1_DIGEST_LENGTH or CC_MD5_DIGEST_LENGTH. SHA1 is larger. 540 | unsigned char buf[CC_SHA1_DIGEST_LENGTH]; 541 | CCHmac( algorithm, [keyData bytes], [keyData length], [self bytes], [self length], buf ); 542 | 543 | return ( [NSData dataWithBytes: buf length: (algorithm == kCCHmacAlgMD5 ? CC_MD5_DIGEST_LENGTH : CC_SHA1_DIGEST_LENGTH)] ); 544 | } 545 | 546 | @end -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSString+Base64.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Base64.h 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Base64Additions) 12 | 13 | + (NSString *)base64StringFromData:(NSData *)data length:(NSUInteger)length; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/NSString+Base64.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSStringAdditions.m 3 | // Gurpartap Singh 4 | // 5 | // Created by Gurpartap Singh on 06/05/12. 6 | // Copyright (c) 2012 Gurpartap Singh. All rights reserved. 7 | // 8 | 9 | #import "NSString+Base64.h" 10 | 11 | static char base64EncodingTable[64] = { 12 | 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 13 | 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 14 | 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 15 | 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' 16 | }; 17 | 18 | @implementation NSString (Base64Additions) 19 | 20 | + (NSString *)base64StringFromData: (NSData *)data length: (NSUInteger)length { 21 | unsigned long ixtext, lentext; 22 | long ctremaining; 23 | unsigned char input[3], output[4]; 24 | short i, charsonline = 0, ctcopy; 25 | const unsigned char *raw; 26 | NSMutableString *result; 27 | 28 | lentext = [data length]; 29 | if (lentext < 1) { 30 | return @""; 31 | } 32 | result = [NSMutableString stringWithCapacity: lentext]; 33 | raw = [data bytes]; 34 | ixtext = 0; 35 | 36 | while (true) { 37 | ctremaining = lentext - ixtext; 38 | if (ctremaining <= 0) { 39 | break; 40 | } 41 | for (i = 0; i < 3; i++) { 42 | unsigned long ix = ixtext + i; 43 | if (ix < lentext) { 44 | input[i] = raw[ix]; 45 | } 46 | else { 47 | input[i] = 0; 48 | } 49 | } 50 | output[0] = (input[0] & 0xFC) >> 2; 51 | output[1] = ((input[0] & 0x03) << 4) | ((input[1] & 0xF0) >> 4); 52 | output[2] = ((input[1] & 0x0F) << 2) | ((input[2] & 0xC0) >> 6); 53 | output[3] = input[2] & 0x3F; 54 | ctcopy = 4; 55 | switch (ctremaining) { 56 | case 1: 57 | ctcopy = 2; 58 | break; 59 | case 2: 60 | ctcopy = 3; 61 | break; 62 | } 63 | 64 | for (i = 0; i < ctcopy; i++) { 65 | [result appendString: [NSString stringWithFormat: @"%c", base64EncodingTable[output[i]]]]; 66 | } 67 | 68 | for (i = ctcopy; i < 4; i++) { 69 | [result appendString: @"="]; 70 | } 71 | 72 | ixtext += 3; 73 | charsonline += 4; 74 | 75 | if ((length > 0) && (charsonline >= length)) { 76 | charsonline = 0; 77 | } 78 | } 79 | return result; 80 | } 81 | 82 | @end -------------------------------------------------------------------------------- /AlipayFinal/AESCrypt-ObjC/README.md: -------------------------------------------------------------------------------- 1 | # AESCrypt-ObjC - Simple AES encryption / decryption for iOS and OS X 2 | 3 | AESCrypt is a simple to use, opinionated AES encryption / decryption Objective-C class that just works. 4 | 5 | AESCrypt uses the AES-256-CBC cipher and encodes the encrypted data with base64. 6 | 7 | A corresponding gem to easily handle AES encryption / decryption in Ruby is available at http://github.com/Gurpartap/aescrypt. 8 | 9 | ## Installation 10 | 11 | Add this line to your class: 12 | 13 | #import "AESCrypt.h" 14 | 15 | ## Usage 16 | 17 | NSString *message = @"top secret message"; 18 | NSString *password = @"p4ssw0rd"; 19 | 20 | Encrypting 21 | 22 | NSString *encryptedData = [AESCrypt encrypt:message password:password]; 23 | 24 | Decrypting 25 | 26 | NSString *message = [AESCrypt decrypt:encryptedData password:password]; 27 | 28 | ## Common sense 29 | 30 | AESCrypt includes Base64 and Crypto extensions for NSData and NSString classes. If you're already using an extension that provides these, there is no need to use the included classes. Change the code in the AESCrypt class to correspond to your existing implementation of these extensions. 31 | 32 | ## Corresponding usage in Ruby 33 | 34 | The AESCrypt Ruby gem, available at http://github.com/Gurpartap/aescrypt, understands what you're talking about in your Objective-C code. The purpose of the Ruby gem and Objective-C class is to have something that works out of the box across the server (Ruby) and client (Objective-C). However, a standard encryption technique is implemented, which ensures that you can handle the data with any AES compatible library available across the web. So, you're not locked-in. 35 | 36 | Here's how you would use the Ruby gem: 37 | 38 | message = "top secret message" 39 | password = "p4ssw0rd" 40 | 41 | Encrypting 42 | 43 | encrypted_data = AESCrypt.encrypt(message, password) 44 | 45 | Decrypting 46 | 47 | message = AESCrypt.decrypt(encrypted_data, password) 48 | 49 | See the Ruby gem README at http://github.com/Gurpartap/aescrypt for more details. 50 | 51 | ## License 52 | 53 | NSData+CommonCrypto is Copyright (c) 2008-2009, Jim Dovey 54 | 55 | AESCrypt is Copyright (c) 2012 Gurpartap Singh 56 | 57 | See LICENSE for license terms. 58 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayFinal-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 支付宝钱包(仿) 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.wsy.alipay 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UIStatusBarTintParameters 34 | 35 | UINavigationBar 36 | 37 | Style 38 | UIBarStyleDefault 39 | Translucent 40 | 41 | 42 | 43 | UISupportedInterfaceOrientations 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayFinal-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeIconButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeIconButton.h 3 | // test 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol AlipayHomeIconButtonDataSource 12 | -(NSString *)setIconTitle; 13 | -(UIImage * )setIcon; 14 | 15 | @end 16 | 17 | @interface AlipayHomeIconButton : UIButton 18 | @property (nonatomic,strong) NSString * titleBelowIcon; 19 | @property (nonatomic, assign) IBOutlet id dataSource; 20 | @property (nonatomic,assign) BOOL initialized; 21 | @end 22 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeIconButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeIconButton.m 3 | // test 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "AlipayHomeIconButton.h" 10 | @interface AlipayHomeIconButton () 11 | -(void)pressed; 12 | -(void)touchUp; 13 | @end 14 | 15 | @implementation AlipayHomeIconButton 16 | 17 | - (id)initWithFrame:(CGRect)frame 18 | { 19 | self = [super initWithFrame:frame]; 20 | if (self) { 21 | self.initialized=NO; 22 | } 23 | return self; 24 | } 25 | 26 | 27 | // Only override drawRect: if you perform custom drawing. 28 | // An empty implementation adversely affects performance during animation. 29 | - (void)drawRect:(CGRect)rect 30 | { 31 | [super drawRect:rect]; 32 | if (self.initialized) { 33 | return; 34 | } 35 | //取消IB中的title 36 | [self setTitle:@"" forState:UIControlStateNormal]; 37 | [self setTitle:@"" forState:UIControlStateHighlighted]; 38 | //显示自己添加的的title 39 | UILabel * l=[[UILabel alloc]initWithFrame:CGRectMake(0, 56, self.bounds.size.width ,22)]; 40 | l.text=[self.dataSource setIconTitle]; 41 | l.textAlignment=NSTextAlignmentCenter; 42 | l.font = [UIFont fontWithName:@"Arial" size:12]; 43 | l.textColor=[UIColor colorWithRed:150./255 green:150./255 blue:150./255 alpha:150./255]; 44 | [self addSubview:l]; 45 | //添加图片 46 | UIImage * img=[self.dataSource setIcon]; 47 | [self setImage:img forState:UIControlStateNormal]; 48 | [self setImage:img forState:UIControlStateHighlighted]; 49 | //设置背景图片 50 | UIImage * bgimg=[UIImage imageNamed:@"AlipayHomeIcons.bundle/app_item_pressed_bg.png"]; 51 | [self setBackgroundImage:bgimg forState:UIControlStateHighlighted]; 52 | 53 | //设置insets 54 | self.contentEdgeInsets=UIEdgeInsetsMake(-11, 0, 0, 0); 55 | //响应事件 56 | // [self addTarget:self action:@selector(pressed) forControlEvents:UIControlEventTouchDown]; 57 | // [self addTarget:self action:@selector(touchUp) forControlEvents:UIControlEventTouchUpInside]; 58 | // [self addTarget:self action:@selector(touchUp) forControlEvents:UIControlEventTouchUpOutside]; 59 | self.initialized=YES; 60 | } 61 | -(void)pressed{ 62 | self.backgroundColor=[UIColor colorWithRed:235./255 green:235./255 blue:235./255 alpha:1]; 63 | } 64 | -(void)touchUp{ 65 | self.backgroundColor=[UIColor whiteColor]; 66 | } 67 | @end 68 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeNVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeNVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "SinglePageNVC.h" 10 | 11 | @interface AlipayHomeNVC : SinglePageNVC 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeNVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeNVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "AlipayHomeNVC.h" 10 | 11 | @interface AlipayHomeNVC () 12 | 13 | @end 14 | 15 | @implementation AlipayHomeNVC 16 | 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // 设置图片 22 | self.tabbarItemImagePath=@"tabbed_icon.bundle/zfb支付宝"; 23 | [self setTabBarImage]; 24 | self.tabBarController.view.backgroundColor=[UIColor whiteColor]; 25 | 26 | // CGRect frame = CGRectMake(0, 0, 320, 49); 27 | // UIView *v = [[UIView alloc] initWithFrame:frame]; 28 | // UIImage *img = [UIImage imageNamed:@"tabbar.png"]; 29 | // UIColor *color = [[UIColor alloc] initWithPatternImage:img]; 30 | // v.backgroundColor = color; 31 | // [tabBarController.tabBar insertSubview:v atIndex:0]; 32 | // tabBarController.tabBar.opaque = YES; 33 | 34 | } 35 | 36 | - (void)didReceiveMemoryWarning 37 | { 38 | [super didReceiveMemoryWarning]; 39 | // Dispose of any resources that can be recreated. 40 | } 41 | 42 | /* 43 | #pragma mark - Navigation 44 | 45 | // In a storyboard-based application, you will often want to do a little preparation before navigation 46 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 47 | { 48 | // Get the new view controller using [segue destinationViewController]. 49 | // Pass the selected object to the new view controller. 50 | } 51 | */ 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AlipayHomeIconButton.h" 11 | @interface AlipayHomeVC : UIViewController 12 | - (IBAction)bill_click:(UIBarButtonItem *)sender; 13 | -(void)noDefinitionPopup:(id)sender; 14 | @end 15 | -------------------------------------------------------------------------------- /AlipayFinal/AlipayHome/AlipayHomeVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // AlipayHomeVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "AlipayHomeVC.h" 10 | #import 11 | #import 12 | 13 | 14 | @interface AlipayHomeVC () 15 | @property (weak, nonatomic) IBOutlet UIButton *topleftImageButton; 16 | @property (weak, nonatomic) IBOutlet UIButton *toprightImageButton; 17 | @property (strong,nonatomic) NSDictionary * plistRootDictionary; 18 | @property (strong,nonatomic) NSMutableArray * titles,*iconPaths; 19 | @property (strong,nonatomic) UIViewController * billVC; 20 | -(void)logSubviews:(NSArray *)subviews tabnum:(int)tabnum; 21 | @end 22 | 23 | @implementation AlipayHomeVC 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | //设置分割线,上面有一个分割线,下面的tabbar还要是白色的 29 | UIView * spliter=[[UIView alloc]init]; 30 | spliter.backgroundColor=[UIColor blackColor]; 31 | spliter.frame=CGRectMake(0, 0, 320, 100); 32 | [self.view insertSubview:spliter atIndex:0]; 33 | // 设置左上角和右上角的按钮图片 34 | NSString * imagePath=@"AlipayHome.bundle/ap_home_top_icon_scan_new"; 35 | NSString * highlightImagePath=[NSString stringWithFormat:@"%@_highlight",imagePath]; 36 | [self.topleftImageButton setImage:[UIImage imageNamed:imagePath] forState:UIControlStateNormal]; 37 | [self.topleftImageButton setImage:[UIImage imageNamed:highlightImagePath] forState:UIControlStateHighlighted]; 38 | 39 | imagePath=@"AlipayHome.bundle/ap_home_top_icon_pay_new"; 40 | highlightImagePath=[NSString stringWithFormat:@"%@_highlight",imagePath]; 41 | [self.toprightImageButton setImage:[UIImage imageNamed:imagePath] forState:UIControlStateNormal]; 42 | [self.toprightImageButton setImage:[UIImage imageNamed:highlightImagePath] forState:UIControlStateHighlighted]; 43 | 44 | 45 | //加载plist文件 46 | NSString * s=[[NSBundle mainBundle] pathForResource:@"AlipayHomeIcons.bundle/AlipayHomeIcons" ofType:@"plist"]; 47 | if (s) { 48 | self.plistRootDictionary=[NSDictionary dictionaryWithContentsOfFile:s]; 49 | } 50 | id key; 51 | self.titles= [[NSMutableArray alloc]init]; 52 | self.iconPaths= [[NSMutableArray alloc]init]; 53 | 54 | for (key in self.plistRootDictionary) { 55 | [self.titles addObject:key]; 56 | [self.iconPaths addObject: [self.plistRootDictionary objectForKey:key]]; 57 | } 58 | 59 | } 60 | 61 | - (void)didReceiveMemoryWarning 62 | { 63 | [super didReceiveMemoryWarning]; 64 | // Dispose of any resources that can be recreated. 65 | } 66 | 67 | /* 68 | #pragma mark - Navigation 69 | 70 | // In a storyboard-based application, you will often want to do a little preparation before navigation 71 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 72 | { 73 | // Get the new view controller using [segue destinationViewController]. 74 | // Pass the selected object to the new view controller. 75 | } 76 | */ 77 | 78 | -(void)logSubviews:(NSArray *)subviews tabnum:(int)tabnum{ 79 | UIView * i; 80 | //设置tabstring 81 | NSMutableString * tabstring=[NSMutableString stringWithString:@""]; 82 | for(int j=1;j<=tabnum;j++){ 83 | [tabstring appendFormat:@"+"]; 84 | } 85 | //递归遍历 86 | for (i in subviews) { 87 | if (i.subviews.count>0) {//还有subviews 88 | NSLog(@"%@Have %d subvies.%@ ",tabstring,i.subviews.count,i); 89 | [self logSubviews:i.subviews tabnum:(tabnum+1)]; 90 | }else{//当前是终端view 91 | NSLog(@"%@ %@",tabstring,i); 92 | } 93 | } 94 | 95 | } 96 | #pragma mark tableview protocol 97 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 98 | return 2; 99 | } 100 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 101 | static NSString *CellIdentifier = @"id_fourbuttons"; 102 | 103 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 104 | 105 | //设置右边的竖线边框 106 | for (int i=1; i<=3; i++) { 107 | UILabel * tempLabel=[[UILabel alloc]initWithFrame:CGRectMake(80*i+1, 0, 1, cell.frame.size.height)]; 108 | tempLabel.backgroundColor=[UIColor colorWithRed:235./255 green:235./255 blue:235./255 alpha:1]; 109 | [cell addSubview:tempLabel]; 110 | } 111 | //设置下面的边框 112 | UILabel * tempLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, cell.frame.size.height, cell.frame.size.width, 1)]; 113 | tempLabel.backgroundColor=[UIColor colorWithRed:235./255 green:235./255 blue:235./255 alpha:1]; 114 | [cell addSubview:tempLabel]; 115 | 116 | return cell; 117 | 118 | } 119 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 120 | return 2; 121 | } 122 | 123 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 124 | return 83.; 125 | } 126 | 127 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ 128 | return 10; 129 | } 130 | 131 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ 132 | return 20; 133 | } 134 | 135 | 136 | #pragma mark AlipayHomeIconDataSource 137 | -(UIImage *)setIcon{ 138 | static int i=0; 139 | i++; 140 | NSString * s=[NSString stringWithFormat:@"AlipayHomeIcons.bundle/%@",self.iconPaths[i]]; 141 | UIImage * img= [UIImage imageNamed:s]; 142 | UIImage * scaledimg=[UIImage imageWithCGImage:img.CGImage scale:img.scale*2.0 orientation:img.imageOrientation]; 143 | return scaledimg; 144 | } 145 | -(NSString *)setIconTitle{ 146 | static int i=0; 147 | i++; 148 | return self.titles[i]; 149 | } 150 | #pragma mark Bill 151 | - (IBAction)bill_click:(UIBarButtonItem *)sender { 152 | self.billVC=[[UIViewController alloc]init]; 153 | self.billVC.view=[[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds]; 154 | self.billVC.view.backgroundColor=[UIColor whiteColor];//前面的页面设置背景为黑色了,到这也是黑色? 155 | UILabel * label=[[UILabel alloc]initWithFrame:self.billVC.view.bounds]; 156 | label.text=@"账单页面是用代码生成的,详见biil_click"; 157 | [self.billVC.view addSubview:label]; 158 | 159 | //维护UINavigationItem 160 | //左 161 | self.billVC.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithTitle:@"<" style:UIBarButtonItemStylePlain target:self action:@selector(popVC)]; 162 | self.billVC.navigationItem.leftBarButtonItem.tintColor=[UIColor whiteColor]; 163 | //中,高23pt,白色 164 | //self.billVC.title=@"账单"; //字体较小 165 | UIButton * but=[[UIButton alloc]init]; 166 | but.tintColor=[UIColor whiteColor]; 167 | [but setTitle:@"账单" forState:UIControlStateNormal]; 168 | but.titleLabel.font= [UIFont systemFontOfSize: 23]; 169 | 170 | self.billVC.navigationItem.titleView=but; 171 | //右 172 | self.billVC.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"AlipayHomeIcons.bundle/bill_history.png"] style:UIBarButtonItemStylePlain target:self action:@selector(noDefinitionPopup:)]; 173 | self.billVC.navigationItem.rightBarButtonItem.tintColor=[UIColor whiteColor]; 174 | [self.navigationController pushViewController:self.billVC animated:YES]; 175 | 176 | } 177 | 178 | -(void)noDefinitionPopup:(id)sender{ 179 | UIAlertView * alert=[[UIAlertView alloc]initWithTitle:@"提示" message:@"此功能未实现" delegate:nil cancelButtonTitle:@"cancel" otherButtonTitles:nil]; 180 | [alert show]; 181 | } 182 | 183 | -(void)popVC{ 184 | [self.navigationController popViewControllerAnimated:YES]; 185 | } 186 | 187 | 188 | 189 | @end 190 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesButton.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol DiscoveryButtonDataSource 12 | @required 13 | -(NSString *)setIconTitle:(id)button; 14 | //-(UIImage * )setIcon; 15 | 16 | @end 17 | 18 | @interface DiscoveryButton : UIButton 19 | @property (nonatomic,strong) NSString * titleBelowIcon; 20 | @property (nonatomic, assign) IBOutlet id dataSource; 21 | @property (nonatomic,assign) BOOL initialized; 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesButton.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "DiscoveryButton.h" 10 | @interface DiscoveryButton () 11 | -(void)pressed; 12 | -(void)touchUp; 13 | @end 14 | 15 | 16 | @implementation DiscoveryButton 17 | 18 | - (id)initWithFrame:(CGRect)frame 19 | { 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | self.initialized=NO; 23 | } 24 | return self; 25 | } 26 | 27 | 28 | // Only override drawRect: if you perform custom drawing. 29 | // An empty implementation adversely affects performance during animation. 30 | - (void)drawRect:(CGRect)rect 31 | { 32 | [super drawRect:rect]; 33 | 34 | if (self.initialized) { 35 | return; 36 | } 37 | //IB中没有title,在这setTitle反而导致图片位置异常,所以注释掉。 38 | // [self setTitle:@"" forState:UIControlStateNormal]; 39 | // [self setTitle:@"" forState:UIControlStateHighlighted]; 40 | //显示自己添加的的title 41 | UILabel * l=[[UILabel alloc]initWithFrame:CGRectMake(0, 68, self.bounds.size.width ,22)]; 42 | l.text=[self.dataSource setIconTitle:self]; 43 | l.textAlignment=NSTextAlignmentCenter; 44 | l.font = [UIFont fontWithName:@"Arial" size:12]; 45 | l.textColor=[UIColor colorWithRed:150./255 green:150./255 blue:150./255 alpha:1]; 46 | [self addSubview:l]; 47 | 48 | //设置insets 49 | self.contentHorizontalAlignment=UIControlContentHorizontalAlignmentCenter; 50 | self.contentVerticalAlignment=UIControlContentVerticalAlignmentCenter; 51 | self.contentEdgeInsets=UIEdgeInsetsMake(-11, 0, 0, 0); 52 | //响应事件 53 | // [self addTarget:self action:@selector(pressed) forControlEvents:UIControlEventTouchDown]; 54 | // [self addTarget:self action:@selector(touchUp) forControlEvents:UIControlEventTouchUpInside]; 55 | // [self addTarget:self action:@selector(touchUp) forControlEvents:UIControlEventTouchUpOutside]; 56 | self.initialized=YES; 57 | } 58 | 59 | -(void)touchUp{ 60 | self.backgroundColor=[UIColor whiteColor]; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryNVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryNVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "SinglePageNVC.h" 10 | 11 | @interface DiscoveryNVC : SinglePageNVC 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryNVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryNVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "DiscoveryNVC.h" 10 | 11 | @interface DiscoveryNVC () 12 | 13 | @end 14 | 15 | @implementation DiscoveryNVC 16 | 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // 设置图片 22 | self.tabbarItemImagePath=@"tabbed_icon.bundle/ts探索"; 23 | [self setTabBarImage];} 24 | 25 | - (void)didReceiveMemoryWarning 26 | { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | /* 32 | #pragma mark - Navigation 33 | 34 | // In a storyboard-based application, you will often want to do a little preparation before navigation 35 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 36 | { 37 | // Get the new view controller using [segue destinationViewController]. 38 | // Pass the selected object to the new view controller. 39 | } 40 | */ 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryTVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryTVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DiscoveryTVC : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/Discovery/DiscoveryTVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DiscoveryTVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "DiscoveryTVC.h" 10 | 11 | @interface DiscoveryTVC () 12 | 13 | @end 14 | 15 | @implementation DiscoveryTVC 16 | 17 | - (id)initWithStyle:(UITableViewStyle)style 18 | { 19 | self = [super initWithStyle:style]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | //其实这个完全可以做成static tableview。 30 | 31 | } 32 | 33 | - (void)didReceiveMemoryWarning 34 | { 35 | [super didReceiveMemoryWarning]; 36 | // Dispose of any resources that can be recreated. 37 | } 38 | 39 | #pragma mark tableview protocol 40 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 41 | return 2; 42 | } 43 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 44 | //有两个id id_fourbuttons id_rightDetail 45 | 46 | //判断在哪个section,设置不同cellid 47 | NSString *cellid;; 48 | if (indexPath.section==0) { 49 | cellid = @"id_fourbuttons"; 50 | }else{ 51 | cellid=@"id_rightDetail"; 52 | } 53 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid]; 54 | //section==0时就不修改了(创建DiscoveryButton时内部维护),section==1时需要设置title和detail 55 | if(indexPath.section==1){ 56 | if (indexPath.row==0) { 57 | cell.imageView.image=[UIImage imageNamed:@"Disc_movie"]; 58 | [cell.textLabel setText:@"电影票"]; 59 | [cell.detailTextLabel setText:@"看电影 学撒娇"]; 60 | } else { 61 | cell.imageView.image=[UIImage imageNamed:@"Disc_taxi"]; 62 | [cell.textLabel setText:@"快的打车"]; 63 | [cell.detailTextLabel setText:@""]; 64 | } 65 | 66 | } 67 | 68 | return cell; 69 | 70 | } 71 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 72 | if (section==0) { 73 | return 1; 74 | }else{ 75 | return 2; 76 | } 77 | } 78 | 79 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 80 | if (indexPath.section==0) { 81 | return 94.; 82 | }else if(indexPath.section==1){ 83 | return 50.; 84 | }else{ 85 | return 0.; 86 | } 87 | } 88 | 89 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ 90 | if (section==0) { 91 | return 16; 92 | }else{ 93 | return 21; 94 | } 95 | } 96 | 97 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ 98 | return 0; 99 | } 100 | 101 | 102 | #pragma mark AlipayHomeIconDataSource 103 | -(NSString *)setIconTitle:(id)button{ 104 | UIButton * but=button; 105 | switch (but.tag) { 106 | case 1: 107 | return @"红包"; 108 | break; 109 | case 2: 110 | return @"电子券"; 111 | break; 112 | case 3: 113 | return @"行程单"; 114 | break; 115 | case 4: 116 | return @"会员卡"; 117 | break; 118 | default: 119 | return @""; 120 | break; 121 | } 122 | } 123 | 124 | @end 125 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePassword.bundle/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/GesturePassword/GesturePassword.bundle/avatar.png -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordButton.h 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GesturePasswordButton : UIView 12 | 13 | @property (nonatomic,assign) BOOL selected; 14 | 15 | @property (nonatomic,assign) BOOL success; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordButton.m 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | #import "GesturePasswordButton.h" 10 | 11 | #define bounds self.bounds 12 | 13 | @implementation GesturePasswordButton 14 | @synthesize selected; 15 | @synthesize success; 16 | 17 | //这个Button的骨架 18 | - (id)initWithFrame:(CGRect)frame 19 | { 20 | self = [super initWithFrame:frame]; 21 | if (self) { 22 | // Initialization code 23 | success=YES; 24 | [self setBackgroundColor:[UIColor clearColor]]; 25 | } 26 | return self; 27 | } 28 | 29 | 30 | // Only override drawRect: if you perform custom drawing. 31 | // An empty implementation adversely affects performance during animation. 32 | //系统调用,绘图 33 | - (void)drawRect:(CGRect)rect 34 | { 35 | // Drawing code 36 | CGContextRef context = UIGraphicsGetCurrentContext(); 37 | 38 | if (selected) { 39 | if (success) { 40 | CGContextSetRGBStrokeColor(context, 2/255.f, 174/255.f, 240/255.f,1);//线条颜色 41 | CGContextSetRGBFillColor(context,2/255.f, 174/255.f, 240/255.f,1); 42 | } 43 | else { 44 | CGContextSetRGBStrokeColor(context, 208/255.f, 36/255.f, 36/255.f,1);//线条颜色 45 | CGContextSetRGBFillColor(context,208/255.f, 36/255.f, 36/255.f,1); 46 | } 47 | CGRect frame = CGRectMake(bounds.size.width/2-bounds.size.width/8+1, bounds.size.height/2-bounds.size.height/8, bounds.size.width/4, bounds.size.height/4); 48 | 49 | CGContextAddEllipseInRect(context,frame); 50 | CGContextFillPath(context); 51 | } 52 | else{ 53 | CGContextSetRGBStrokeColor(context, 1,1,1,1);//线条颜色 54 | } 55 | 56 | CGContextSetLineWidth(context,2); 57 | CGRect frame = CGRectMake(2, 2, bounds.size.width-3, bounds.size.height-3); 58 | CGContextAddEllipseInRect(context,frame); 59 | CGContextStrokePath(context); 60 | if (success) { 61 | CGContextSetRGBFillColor(context,30/255.f, 175/255.f, 235/255.f,0.3); 62 | } 63 | else { 64 | CGContextSetRGBFillColor(context,208/255.f, 36/255.f, 36/255.f,0.3); 65 | } 66 | CGContextAddEllipseInRect(context,frame); 67 | if (selected) { 68 | CGContextFillPath(context); 69 | } 70 | 71 | } 72 | 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordController.h 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #import 12 | #import "TentacleView.h" 13 | #import "GesturePasswordView.h" 14 | 15 | #import "AESCrypt.h" 16 | #define AESKEY @"123456" 17 | 18 | @class GesturePasswordController; 19 | 20 | @protocol GesturePasswordControllerDelegate 21 | -(void)GesturePasswordController:(GesturePasswordController *)passController verifyOK:(id)nilplaceholder; 22 | -(void)GesturePasswordController:(GesturePasswordController *)passController resetOK:(id)nilplaceholder; 23 | @end 24 | 25 | @interface GesturePasswordController : UIViewController 26 | 27 | - (void)clear; 28 | - (BOOL)exist; 29 | 30 | -(NSString *)getDecryptedPassword; 31 | -(void)saveUnEncryptedPassword:(NSString *)pass; 32 | @property (nonatomic,weak) id delegate; 33 | @end 34 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordController.m 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "GesturePasswordController.h" 12 | 13 | #define BLog(formatString, ...) NSLog((@">Blog:%s " formatString), __PRETTY_FUNCTION__, ##__VA_ARGS__); 14 | 15 | //VC控制器有两个方法,clear、exist。还有3个私有实例变量 gesturePasswordView、previousString、password 16 | @interface GesturePasswordController () 17 | 18 | @property (nonatomic,strong) GesturePasswordView * gesturePasswordView; 19 | 20 | @end 21 | 22 | @implementation GesturePasswordController { 23 | NSString * previousString; 24 | NSString * password; 25 | } 26 | 27 | @synthesize gesturePasswordView; 28 | 29 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 30 | { 31 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 32 | if (self) { 33 | // Custom initialization 34 | } 35 | return self; 36 | } 37 | 38 | - (void)viewDidLoad 39 | { 40 | [super viewDidLoad]; 41 | // Do any additional setup after loading the view. 42 | previousString = [NSString string]; 43 | 44 | 45 | password = [self getDecryptedPassword]; 46 | BLog(@"password: %d",password); 47 | //preset这个viewcontroller之后,读取以前保存的password。 48 | if ([password isEqualToString:@""]) { //以前没有保存过,就reset创建一个手势密码 49 | [self reset]; 50 | } 51 | else { // 以前保存过password,就验证。 52 | [self verify]; 53 | } 54 | } 55 | 56 | - (void)didReceiveMemoryWarning 57 | { 58 | [super didReceiveMemoryWarning]; 59 | // Dispose of any resources that can be recreated. 60 | } 61 | 62 | 63 | #pragma mark - 验证手势密码,显示passwordview让用户触摸 64 | - (void)verify{ 65 | gesturePasswordView = [[GesturePasswordView alloc]initWithFrame:[UIScreen mainScreen].bounds]; 66 | [gesturePasswordView.tentacleView setVerificationDelegate:self]; 67 | [gesturePasswordView.tentacleView setStyle:1]; 68 | [gesturePasswordView setGesturePasswordDelegate:self];//GesturePasswordDelegate要实现forget和change两个方法 69 | [self.view addSubview:gesturePasswordView]; 70 | } 71 | 72 | #pragma mark - 重置手势密码,显示passwordview,隐藏两个按钮 73 | - (void)reset{ 74 | gesturePasswordView = [[GesturePasswordView alloc]initWithFrame:[UIScreen mainScreen].bounds]; 75 | [gesturePasswordView.tentacleView setResetDelegate:self]; 76 | [gesturePasswordView.tentacleView setStyle:2]; 77 | // [gesturePasswordView.imgView setHidden:YES]; 78 | [gesturePasswordView.forgetButton setHidden:YES]; 79 | [gesturePasswordView.changeButton setHidden:YES]; 80 | [self.view addSubview:gesturePasswordView];//这时才刚显示了界面,此界面没有两个按钮,所以只能输入手势 81 | } 82 | 83 | #pragma mark - 判断是否已存在手势密码 84 | - (BOOL)exist{ 85 | password = [self getDecryptedPassword]; 86 | if ([password isEqualToString:@""]) 87 | return NO; 88 | return YES; 89 | } 90 | 91 | #pragma mark - 清空记录 92 | - (void)clear{ 93 | [[NSUserDefaults 94 | standardUserDefaults] removeObjectForKey:@"GesturePassword"]; 95 | 96 | } 97 | 98 | #pragma mark - 按钮事件改变手势密码 99 | - (void)change{ 100 | UIAlertView * alert=[[UIAlertView alloc]initWithTitle:@"提示" message:@"此功能未实现" delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil]; 101 | [alert show];} 102 | 103 | #pragma mark - 按钮事件忘记手势密码 104 | - (void)forget{ 105 | UIAlertView * alert=[[UIAlertView alloc]initWithTitle:@"提示" message:@"此功能未实现" delegate:nil cancelButtonTitle:@"知道了" otherButtonTitles:nil, nil]; 106 | [alert show]; 107 | } 108 | #pragma mark - tentacle触角是否正确 109 | - (BOOL)verification:(NSString *)result{ 110 | if ([result isEqualToString:password]) { 111 | [gesturePasswordView.state setTextColor:[UIColor colorWithRed:2/255.f green:174/255.f blue:240/255.f alpha:1]]; 112 | [gesturePasswordView.state setText:@"输入正确"]; 113 | //自己加的 114 | [self.delegate GesturePasswordController:self verifyOK:nil]; 115 | //[self presentViewController:(UIViewController) animated:YES completion:nil]; 116 | return YES; 117 | } 118 | [gesturePasswordView.state setTextColor:[UIColor redColor]]; 119 | [gesturePasswordView.state setText:@"手势密码错误"]; 120 | return NO; 121 | } 122 | #pragma mark - tentacle中定义协议resetPassword 123 | //TouchEnd时、切tentacle.style为2时 调用此函数,用来重设密码 124 | - (BOOL)resetPassword:(NSString *)result{ 125 | if ([previousString isEqualToString:@""]) { //previousString为空,第一次输入手势 126 | previousString=result;//将第一次手势保存到一个previousString 它与password完全不是一个东西 127 | [gesturePasswordView.tentacleView enterArgin];//再让用户输入一次手势密码,然后就到下面的else部分了 128 | [gesturePasswordView.state setTextColor:[UIColor colorWithRed:2/255.f green:174/255.f blue:240/255.f alpha:1]]; 129 | [gesturePasswordView.state setText:@"请验证输入密码"]; 130 | return YES; 131 | } 132 | else { //第二次输入手势 133 | if ([result isEqualToString:previousString]) { 134 | //第二次与第一次相同,可以保存了 135 | [self saveUnEncryptedPassword:result]; 136 | BLog(@"保存密码OK!"); 137 | [self.delegate GesturePasswordController:self resetOK:nil]; 138 | [gesturePasswordView.state setTextColor:[UIColor colorWithRed:2/255.f green:174/255.f blue:240/255.f alpha:1]]; 139 | [gesturePasswordView.state setText:@"已保存手势密码"]; 140 | //reset成功,关闭这个弹出窗 141 | [self dismissViewControllerAnimated:YES completion:nil]; 142 | return YES; 143 | } 144 | else{ 145 | //两次输入不相同 146 | previousString =@""; 147 | [gesturePasswordView.state setTextColor:[UIColor redColor]]; 148 | [gesturePasswordView.state setText:@"两次密码不一致,请重新输入"]; 149 | return NO; 150 | } 151 | } 152 | } 153 | 154 | -(NSString *)getDecryptedPassword{ 155 | NSUserDefaults * defaults=[NSUserDefaults standardUserDefaults]; 156 | NSString * encrypedPass=[defaults stringForKey:@"key_GuesturePassword"]; //可能返回nil 157 | NSString * decryptedPass=[AESCrypt decrypt:encrypedPass password:AESKEY];//不可能返回nil 158 | return decryptedPass; 159 | } 160 | -(void)saveUnEncryptedPassword:(NSString *)pass{ 161 | NSUserDefaults * defaults=[NSUserDefaults standardUserDefaults]; 162 | NSString * encryptedPass=[AESCrypt encrypt:pass password:AESKEY]; 163 | [defaults setObject:encryptedPass forKey:@"key_GuesturePassword"]; 164 | [defaults synchronize]; 165 | } 166 | 167 | 168 | 169 | @end 170 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordView.h 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | /*GesturePasswordView:UIView. 这个类的作用是显示九宫格界面。有5个属性. 9 | TentacleView,tentacle触须,也是一个UIView 10 | state,一个Label,用来显示当前状态。 11 | gesturePasswordDelegate,此属性用来让VC实现,实现此view的forget、change功能 12 | imgView 头像 13 | forgetButton 14 | changeButton 15 | 16 | 17 | 18 | */ 19 | 20 | @protocol GesturePasswordDelegate 21 | 22 | - (void)forget; 23 | - (void)change; 24 | 25 | @end 26 | 27 | #import 28 | #import "TentacleView.h" 29 | 30 | @interface GesturePasswordView : UIView 31 | 32 | @property (nonatomic,strong) TentacleView * tentacleView; 33 | 34 | @property (nonatomic,strong) UILabel * state; 35 | 36 | @property (nonatomic,assign) id gesturePasswordDelegate; 37 | 38 | @property (nonatomic,strong) UIImageView * imgView; 39 | @property (nonatomic,strong) UIButton * forgetButton; 40 | @property (nonatomic,strong) UIButton * changeButton; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/GesturePasswordView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GesturePasswordView.m 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | #import "GesturePasswordView.h" 10 | #import "GesturePasswordButton.h" 11 | #import "TentacleView.h" 12 | 13 | @implementation GesturePasswordView { 14 | //私有实例变量 15 | NSMutableArray * buttonArray; 16 | CGPoint lineStartPoint; 17 | CGPoint lineEndPoint; 18 | } 19 | @synthesize imgView; 20 | @synthesize forgetButton; 21 | @synthesize changeButton; 22 | 23 | @synthesize tentacleView; 24 | @synthesize state; 25 | @synthesize gesturePasswordDelegate; 26 | 27 | //只能编程调用initWithFrame:方法。IB调用的时用的是initWithCoder 28 | - (id)initWithFrame:(CGRect)frame 29 | { 30 | self = [super initWithFrame:frame]; 31 | if (self) { 32 | // Initialization code 33 | buttonArray = [[NSMutableArray alloc]initWithCapacity:0]; 34 | //⬇️ 创建一个view,内部只有9个button,并且把这个view添加到当前PasswordView上(subviews[0]) 35 | UIView * view = [[UIView alloc]initWithFrame:CGRectMake(frame.size.width/2-160, frame.size.height/2-80, 320, 320)]; 36 | for (int i=0; i<9; i++) { 37 | NSInteger row = i/3; 38 | NSInteger col = i%3; 39 | // Button Frame 40 | 41 | NSInteger distance = 320/3; 42 | NSInteger size = distance/1.5; 43 | NSInteger margin = size/4; 44 | GesturePasswordButton * gesturePasswordButton = [[GesturePasswordButton alloc]initWithFrame:CGRectMake(col*distance+margin, row*distance, size, size)]; 45 | [gesturePasswordButton setTag:i]; 46 | [view addSubview:gesturePasswordButton]; 47 | [buttonArray addObject:gesturePasswordButton]; 48 | } 49 | frame.origin.y=0; 50 | view.center=CGPointMake(view.center.x, view.center.y-20); //view向上移动20pt 51 | [self addSubview:view]; 52 | //⬇️触手,内部只有9个button,并且把这个tentacleview添加到当前PasswordView上(subviews[1]),覆盖了上面的九宫格view 53 | tentacleView = [[TentacleView alloc]initWithFrame:view.frame]; 54 | [tentacleView setButtonArray:buttonArray]; 55 | [tentacleView setTouchBeginDelegate:self]; 56 | [self addSubview:tentacleView]; 57 | //⬇️ state是一个宽280高30的标签,居中对齐,字体14pt。一个方块的左边点坐标=方块中心点坐标-0.5宽,所以state的center为(屏幕中心x,屏幕中心y-105)。y不如直接改为60。或者直接先创建然后设置center位置 58 | //state = [[UILabel alloc]initWithFrame:CGRectMake(frame.size.width/2-140, frame.size.height/2-105-15, 280, 30)];//作者代码 59 | //state = [[UILabel alloc]initWithFrame:CGRectMake(frame.size.width/2-140, 60, 280, 30)];//第二种 60 | state=[[UILabel alloc]init];//第三种 61 | state.center=CGPointMake(frame.size.width/2, 125);//第三种 62 | state.bounds=CGRectMake(0, 0, 280, 30);//第三种 63 | [state setTextAlignment:NSTextAlignmentCenter]; 64 | [state setFont:[UIFont systemFontOfSize:14.f]]; 65 | [self addSubview:state]; 66 | 67 | //⬇️imgView是头像 68 | imgView = [[UIImageView alloc]initWithFrame:CGRectMake(frame.size.width/2-35, frame.size.width/2-80-35, 70, 70)]; 69 | imgView.image=[UIImage imageNamed:@"GesturePassword.bundle/avatar.png"]; 70 | imgView.layer.masksToBounds = YES; 71 | [imgView setBackgroundColor:[UIColor whiteColor]]; 72 | [imgView.layer setCornerRadius:35]; 73 | [imgView.layer setBorderColor:[UIColor grayColor].CGColor]; 74 | [imgView.layer setBorderWidth:3]; 75 | [self addSubview:imgView]; 76 | //⬇️设置forgetButton 77 | //forgetButton = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width/2-150, frame.size.height/2+220, 120, 30)]; 78 | forgetButton=[[UIButton alloc]init]; 79 | forgetButton.center=CGPointMake(frame.size.width/2-90, frame.size.height-25); 80 | forgetButton.bounds=CGRectMake(0, 0, 120, 30); 81 | [forgetButton.titleLabel setFont:[UIFont systemFontOfSize:14]]; 82 | [forgetButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 83 | [forgetButton setTitle:@"忘记手势密码" forState:UIControlStateNormal]; 84 | [forgetButton addTarget:self action:@selector(forget) forControlEvents:UIControlEventTouchDown]; 85 | [self addSubview:forgetButton]; 86 | //⬇️设置changeButton 87 | //changeButton = [[UIButton alloc]initWithFrame:CGRectMake(frame.size.width/2+30, frame.size.height/2+220, 120, 30)]; 88 | changeButton=[[UIButton alloc]init]; 89 | changeButton.center=CGPointMake(frame.size.width/2+90, frame.size.height-25); 90 | changeButton.bounds=CGRectMake(0, 0, 120, 30); 91 | [changeButton.titleLabel setFont:[UIFont systemFontOfSize:14]]; 92 | [changeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 93 | [changeButton setTitle:@"修改手势密码" forState:UIControlStateNormal]; 94 | [changeButton addTarget:self action:@selector(change) forControlEvents:UIControlEventTouchDown]; 95 | [self addSubview:changeButton]; 96 | } 97 | 98 | return self; 99 | } 100 | 101 | // Only override drawRect: if you perform custom drawing. 102 | // An empty implementation adversely affects performance during animation. 103 | 104 | - (void)drawRect:(CGRect)rect 105 | { 106 | // Drawing code 107 | CGContextRef context = UIGraphicsGetCurrentContext(); 108 | 109 | CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); 110 | CGFloat colors[] = 111 | { 112 | 134 / 255.0, 157 / 255.0, 147 / 255.0, 1.00, 113 | 3 / 255.0, 3 / 255.0, 37 / 255.0, 1.00, 114 | }; 115 | CGGradientRef gradient = CGGradientCreateWithColorComponents 116 | (rgb, colors, NULL, sizeof(colors)/(sizeof(colors[0])*4)); 117 | CGColorSpaceRelease(rgb); 118 | CGContextDrawLinearGradient(context, gradient,CGPointMake 119 | (0.0,0.0) ,CGPointMake(0.0,self.frame.size.height), 120 | kCGGradientDrawsBeforeStartLocation); 121 | } 122 | 123 | - (void)gestureTouchBegin { 124 | [self.state setText:@""]; 125 | } 126 | 127 | -(void)forget{ 128 | [gesturePasswordDelegate forget]; 129 | } 130 | 131 | -(void)change{ 132 | [gesturePasswordDelegate change]; 133 | } 134 | 135 | 136 | @end 137 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/TentacleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TentacleView.h 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | #import 9 | 10 | @protocol ResetDelegate 11 | - (BOOL)resetPassword:(NSString *)result; 12 | @end 13 | 14 | @protocol VerificationDelegate 15 | - (BOOL)verification:(NSString *)result; 16 | @end 17 | 18 | @protocol TouchBeginDelegate 19 | - (void)gestureTouchBegin; 20 | @end 21 | 22 | /* 23 | TentacleView:UIView,用来显示触手,刚创建时什么都不显示。并且触手不知道对不对,需要代理人告诉自己对不对。 24 | 25 | 有5个属性,1个方法 26 | buttonArray,用于存储button 27 | verificationDelegate,这个委托人 验证触手是否正确,委托人具有verification方法。作者是GPC实现了此协议 28 | resetDelegate,这个委托人有resetPassword方法。作者是让GPC实现了此协议 29 | touchBeginDelegate,手势开始,委托人有gestureTouchBegin方法。作者是让GesturePasswordView实现了此协议 30 | style,样式。passwordcontroller有两种状态,一种是reset状态(没有两个按钮)、一种是verify状态(有按钮)。 31 | 32 | 方法enterArgin,再次输入一次触手。 33 | 34 | */ 35 | 36 | @interface TentacleView : UIView 37 | 38 | @property (nonatomic,strong) NSArray * buttonArray; 39 | 40 | @property (nonatomic,assign) id verificationDelegate; 41 | 42 | @property (nonatomic,assign) id resetDelegate; 43 | 44 | @property (nonatomic,assign) id touchBeginDelegate; 45 | 46 | /* 47 | 1: Verify 48 | 2: Reset 49 | */ 50 | @property (nonatomic,assign) NSInteger style; 51 | 52 | - (void)enterArgin; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AlipayFinal/GesturePassword/TentacleView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TentacleView.m 3 | // GesturePassword 4 | // 5 | // Created by hb on 14-8-23. 6 | // Copyright (c) 2014年 黑と白の印记. All rights reserved. 7 | // 8 | 9 | #import "TentacleView.h" 10 | #import "GesturePasswordButton.h" 11 | 12 | @implementation TentacleView { 13 | CGPoint lineStartPoint; 14 | CGPoint lineEndPoint; 15 | 16 | NSMutableArray * touchesArray; 17 | NSMutableArray * touchedArray; 18 | BOOL success; 19 | } 20 | @synthesize buttonArray; 21 | @synthesize verificationDelegate; 22 | @synthesize resetDelegate; 23 | @synthesize touchBeginDelegate; 24 | @synthesize style; 25 | 26 | - (id)initWithFrame:(CGRect)frame 27 | { 28 | self = [super initWithFrame:frame]; 29 | if (self) { 30 | // Initialization code 31 | touchesArray = [[NSMutableArray alloc]initWithCapacity:0]; 32 | touchedArray = [[NSMutableArray alloc]initWithCapacity:0]; 33 | [self setBackgroundColor:[UIColor clearColor]]; 34 | [self setUserInteractionEnabled:YES]; 35 | success = 1; 36 | } 37 | return self; 38 | } 39 | 40 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 41 | CGPoint touchPoint; 42 | UITouch *touch = [touches anyObject]; 43 | [touchesArray removeAllObjects]; 44 | [touchedArray removeAllObjects]; 45 | [touchBeginDelegate gestureTouchBegin]; 46 | success=1; 47 | if (touch) { 48 | touchPoint = [touch locationInView:self]; 49 | for (int i=0; i 10 | #import "GesturePasswordController.h" 11 | #import "RootTabBarController.h" 12 | #import "WidgetsVC.h" 13 | 14 | 15 | @interface AppDelegate : UIResponder 16 | 17 | @property (strong, nonatomic) UIWindow *window; 18 | //下面两个属性一个方法都是用来显示splash screen的 19 | @property (strong,nonatomic) UIViewController * splashViewController; 20 | -(void)splashAnimate:(NSNumber*)alpha; 21 | 22 | -(void)showWidgetsLoginVC; 23 | -(void)showGestureVC; 24 | -(void)showTabbarVC; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /AlipayFinal/Infrastructure/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-11. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | 12 | @implementation AppDelegate 13 | 14 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 15 | { 16 | //共有三个可选的rootVC loginVC、gestureVC、tabbarVC 17 | /*先判断是否已登陆. 18 | Q1:nsuserdefaults是否已登录? 19 | Q1true:显示gestureVC。设置完手势密码。显示tabbarVC 20 | Q1false:显示loginVC。loginVC输入正确了,再显示gestureVC。再显示tabbarVC 21 | */ 22 | BOOL isLogined=[[NSUserDefaults standardUserDefaults] boolForKey:@"key_isLogined"]; 23 | if (isLogined) { 24 | [self showGestureVC]; 25 | }else{ 26 | //WidgetsVC是一个库,可以创建很多不同的view,这里指使用 27 | [self showWidgetsLoginVC]; 28 | } 29 | 30 | //刚进入的时候还没有view呢! 31 | [self.window addSubview:self.window.rootViewController.view]; 32 | //设置splashVC,显示splashVC.view。不使用其他splashVC的功能 33 | self.splashViewController=[[UIViewController alloc]init]; 34 | NSString * splashImageName=@"splash.jpg"; 35 | if(self.window.bounds.size.height>480){ 36 | splashImageName=@"splashR4.jpg"; 37 | } 38 | self.splashViewController.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:splashImageName]]; 39 | //把splashVC添加进去 40 | [self.window addSubview:self.splashViewController.view]; 41 | //⬇️ 让splashimage显示2s,让用户看一眼得了。 42 | [self performSelector:@selector(splashAnimate:) withObject:@0.0 afterDelay:2.0]; 43 | return YES; 44 | } 45 | 46 | 47 | -(void) splashAnimate:(NSNumber *)alpha{ 48 | // ⬇️ 只能用UIViewAnimationOptionCurveEaseInOut和ViewAnimationOptionTransitionNone两种效果 49 | UIView * splashView=self.splashViewController.view; 50 | [UIView animateWithDuration:1.0 animations:^{ 51 | splashView.transform=CGAffineTransformScale(splashView.transform, 1.5, 1.5); 52 | splashView.alpha=alpha.floatValue; 53 | } completion:^(BOOL finished) { 54 | //ARC通过赋值nil释放内存,动画中不能removeFromSuperview. 55 | [splashView removeFromSuperview]; 56 | self.splashViewController=nil; 57 | }]; 58 | } 59 | 60 | - (void)applicationWillResignActive:(UIApplication *)application 61 | { 62 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 63 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 64 | } 65 | 66 | - (void)applicationDidEnterBackground:(UIApplication *)application 67 | { 68 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 69 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 70 | } 71 | 72 | - (void)applicationWillEnterForeground:(UIApplication *)application 73 | { 74 | // 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. 75 | } 76 | 77 | - (void)applicationDidBecomeActive:(UIApplication *)application 78 | { 79 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 80 | } 81 | 82 | - (void)applicationWillTerminate:(UIApplication *)application 83 | { 84 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 85 | } 86 | #pragma mark 三个showVC方法 87 | -(void)showWidgetsLoginVC{ 88 | WidgetsVC * widgetVC=[[WidgetsVC alloc]initWithNibName:@"Widgets" bundle:[NSBundle mainBundle]]; 89 | widgetVC.delegate=self; 90 | widgetVC.whichViewToPresent=@"loginView"; 91 | self.window.rootViewController=widgetVC; 92 | } 93 | -(void)showGestureVC{ 94 | GesturePasswordController * passwordC=[[GesturePasswordController alloc]init]; 95 | passwordC.delegate=self; 96 | self.window.rootViewController=passwordC; 97 | } 98 | -(void)showTabbarVC{ 99 | UIStoryboard * mainsb =[UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]]; 100 | RootTabBarController * tabVC=[mainsb instantiateInitialViewController]; 101 | self.window.rootViewController=tabVC; 102 | } 103 | 104 | #pragma mark WidegetsVCDelegate 105 | -(void)WidgetsVC:(WidgetsVC *)widgetsVC loginOK:(id)nilplaceholder{ 106 | [self showGestureVC]; 107 | } 108 | 109 | #pragma mark GesturePasswordControllerDelegate 110 | //验证完手势密码进入tabbarVC 111 | -(void)GesturePasswordController:(GesturePasswordController *)passController verifyOK:(id)nilplaceholder{ 112 | [self showTabbarVC]; 113 | } 114 | //设置完手势密码进入tabbarVC 115 | -(void)GesturePasswordController:(GesturePasswordController *)passController resetOK:(id)nilplaceholder{ 116 | [self showTabbarVC]; 117 | } 118 | 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /AlipayFinal/Infrastructure/RootTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootTabBarController.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RootTabBarController : UITabBarController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/Infrastructure/RootTabBarController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootTabBarController.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "RootTabBarController.h" 10 | #import "GesturePasswordController.h" 11 | #import "WidgetsVC.h" 12 | 13 | @interface RootTabBarController () 14 | 15 | @end 16 | 17 | @implementation RootTabBarController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | // 把它下面的viewcontroller都加载了,强制显示tabbarImage 23 | UIViewController * i; 24 | for (i in self.viewControllers) { 25 | [i viewDidLoad]; 26 | }} 27 | 28 | -(void)viewDidAppear:(BOOL)animated{ 29 | [super viewDidAppear:animated]; 30 | 31 | } 32 | 33 | - (void)didReceiveMemoryWarning 34 | { 35 | [super didReceiveMemoryWarning]; 36 | // Dispose of any resources that can be recreated. 37 | } 38 | 39 | /* 40 | #pragma mark - Navigation 41 | 42 | // In a storyboard-based application, you will often want to do a little preparation before navigation 43 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 44 | { 45 | // Get the new view controller using [segue destinationViewController]. 46 | // Pass the selected object to the new view controller. 47 | } 48 | */ 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /AlipayFinal/Infrastructure/SinglePageNVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // SinglePageNVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | //SinglePageNVC 是四个page的父类 11 | @interface SinglePageNVC : UINavigationController 12 | @property (nonatomic,retain) NSString * tabbarItemImagePath; 13 | -(void)setTabBarImage; 14 | @end 15 | -------------------------------------------------------------------------------- /AlipayFinal/Infrastructure/SinglePageNVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // SinglePageNVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "SinglePageNVC.h" 10 | 11 | @interface SinglePageNVC () 12 | @end 13 | 14 | @implementation SinglePageNVC 15 | 16 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 17 | { 18 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 19 | if (self) { 20 | // Custom initialization 21 | } 22 | return self; 23 | } 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view. 29 | } 30 | 31 | - (void)didReceiveMemoryWarning 32 | { 33 | [super didReceiveMemoryWarning]; 34 | // Dispose of any resources that can be recreated. 35 | } 36 | 37 | /* 38 | #pragma mark - Navigation 39 | 40 | // In a storyboard-based application, you will often want to do a little preparation before navigation 41 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 42 | { 43 | // Get the new view controller using [segue destinationViewController]. 44 | // Pass the selected object to the new view controller. 45 | } 46 | */ 47 | -(void)setTabBarImage{ 48 | if (self.tabbarItemImagePath) { 49 | self.tabBarItem.image=[UIImage imageNamed: self.tabbarItemImagePath]; 50 | NSString * selectedImagePath=[NSString stringWithFormat:@"%@_sel",self.tabbarItemImagePath]; 51 | self.tabBarItem.selectedImage=[UIImage imageNamed:selectedImagePath]; 52 | } 53 | 54 | } 55 | @end 56 | -------------------------------------------------------------------------------- /AlipayFinal/Services/ServicesNVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesNVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "SinglePageNVC.h" 10 | 11 | @interface ServicesNVC : SinglePageNVC 12 | @end 13 | -------------------------------------------------------------------------------- /AlipayFinal/Services/ServicesNVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesNVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "ServicesNVC.h" 10 | 11 | @interface ServicesNVC () 12 | 13 | @end 14 | 15 | @implementation ServicesNVC 16 | 17 | 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | // 设置图片 24 | if (!self.tabbarItemImagePath) { //如果没有设置过图片则设置 25 | self.tabbarItemImagePath=@"tabbed_icon.bundle/fw服务窗"; 26 | [self setTabBarImage]; 27 | }else{ 28 | return; 29 | } 30 | 31 | 32 | } 33 | 34 | - (void)didReceiveMemoryWarning 35 | { 36 | [super didReceiveMemoryWarning]; 37 | // Dispose of any resources that can be recreated. 38 | } 39 | 40 | /* 41 | #pragma mark - Navigation 42 | 43 | // In a storyboard-based application, you will often want to do a little preparation before navigation 44 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 45 | { 46 | // Get the new view controller using [segue destinationViewController]. 47 | // Pass the selected object to the new view controller. 48 | } 49 | */ 50 | 51 | 52 | 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /AlipayFinal/Services/ServicesTVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ServicesTVC : UITableViewController 12 | 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /AlipayFinal/Services/ServicesTVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // ServicesVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-13. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "ServicesTVC.h" 10 | 11 | @interface ServicesTVC () 12 | @property (nonatomic,strong) NSArray * servicesPlistArray; 13 | 14 | @end 15 | 16 | @implementation ServicesTVC 17 | 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | //加载plist 23 | NSString * s=[[NSBundle mainBundle] pathForResource:@"Services.bundle/Services" ofType:@"plist"]; 24 | if (s) { 25 | self.servicesPlistArray=[NSArray arrayWithContentsOfFile:s]; 26 | } 27 | } 28 | 29 | - (void)didReceiveMemoryWarning 30 | { 31 | [super didReceiveMemoryWarning]; 32 | // Dispose of any resources that can be recreated. 33 | } 34 | 35 | /* 36 | #pragma mark - Navigation 37 | 38 | // In a storyboard-based application, you will often want to do a little preparation before navigation 39 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 40 | { 41 | // Get the new view controller using [segue destinationViewController]. 42 | // Pass the selected object to the new view controller. 43 | } 44 | */ 45 | #pragma mark tableview protocol 46 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 47 | return 1; 48 | } 49 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 50 | //有两个id ,一个 id_subTitle, 一个 id_basic. Diction的key有iconFileName title detail 51 | //设置cellid 52 | NSDictionary * d=self.servicesPlistArray[indexPath.row]; 53 | NSString * detail=d[@"detail"]; 54 | NSString * cellid; 55 | if([detail compare:@""]==NSOrderedSame){ 56 | cellid=@"id_basic"; 57 | }else{ 58 | cellid=@"id_subTitle"; 59 | } 60 | //获取cellid 61 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid]; 62 | 63 | //设置图片 64 | NSString * imagePath=[NSString stringWithFormat:@"Services.bundle/%@",d[@"iconFileName"]]; 65 | cell.imageView.image=[UIImage imageNamed:imagePath]; 66 | //设置title 67 | [cell.textLabel setText:d[@"title"]]; 68 | //设置detail 69 | [cell.detailTextLabel setText:d[@"detail"]]; 70 | 71 | return cell; 72 | 73 | } 74 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 75 | return self.servicesPlistArray.count; 76 | } 77 | 78 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 79 | return 53.; 80 | } 81 | 82 | 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /AlipayFinal/Wealth/WealthNVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // WealthNVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "SinglePageNVC.h" 10 | 11 | @interface WealthNVC : SinglePageNVC 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/Wealth/WealthNVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // WealthNVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "WealthNVC.h" 10 | 11 | @interface WealthNVC () 12 | 13 | @end 14 | 15 | @implementation WealthNVC 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | // 设置图片 21 | self.tabbarItemImagePath=@"tabbed_icon.bundle/cf财富"; 22 | [self setTabBarImage]; 23 | } 24 | 25 | - (void)didReceiveMemoryWarning 26 | { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | /* 32 | #pragma mark - Navigation 33 | 34 | // In a storyboard-based application, you will often want to do a little preparation before navigation 35 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 36 | { 37 | // Get the new view controller using [segue destinationViewController]. 38 | // Pass the selected object to the new view controller. 39 | } 40 | */ 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /AlipayFinal/Wealth/WealthTVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // WealthTVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-14. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface WealthTVC : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AlipayFinal/Wealth/WealthTVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // WealthTVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-14. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "WealthTVC.h" 10 | 11 | @interface WealthTVC () 12 | 13 | @end 14 | 15 | @implementation WealthTVC 16 | 17 | - (id)initWithStyle:(UITableViewStyle)style 18 | { 19 | self = [super initWithStyle:style]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | 30 | 31 | 32 | } 33 | 34 | - (void)didReceiveMemoryWarning 35 | { 36 | [super didReceiveMemoryWarning]; 37 | // Dispose of any resources that can be recreated. 38 | } 39 | 40 | 41 | 42 | #pragma mark tableview protocol 43 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 44 | return 5; 45 | } 46 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 47 | //有两个id id_subTitle id_rightDetail 48 | 49 | //判断在哪个section,设置不同cellid 50 | NSString *cellid;; 51 | if (indexPath.section==0) { 52 | cellid = @"id_subTitle"; 53 | }else{ 54 | cellid=@"id_rightDetail"; 55 | } 56 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellid]; 57 | if (indexPath.section==0) {//第0个区块,设置用户头像等 58 | cell.imageView.image=[UIImage imageNamed:@"Wea_avatar"]; 59 | [cell.textLabel setText:@"用户姓名"]; 60 | [cell.detailTextLabel setText:@"username@domain.com"]; 61 | }else if(indexPath.section==1 && indexPath.row==0){ 62 | //1.0 63 | cell.imageView.image=[UIImage imageNamed:@"Wea_zhanghuyue"]; 64 | [cell.textLabel setText:@"账户余额"]; 65 | [cell.detailTextLabel setText:[NSString stringWithFormat:@"%.2f",0.0]]; 66 | }else if(indexPath.section==1 && indexPath.row==1){ 67 | //1.1 68 | cell.imageView.image=[UIImage imageNamed:@"Wea_wodeyinhangka"]; 69 | [cell.textLabel setText:@"我的银行卡"]; 70 | [cell.detailTextLabel setText:[NSString stringWithFormat:@"%d张",0]]; 71 | }else if (indexPath.section==2){ 72 | //2.0 73 | cell.imageView.image=[UIImage imageNamed:@"Wea_yuebao"]; 74 | [cell.textLabel setText:@"余额宝"]; 75 | [cell.detailTextLabel setText:@""]; 76 | }else if (indexPath.section==3){ 77 | //3.0 78 | cell.imageView.image=[UIImage imageNamed:@"Wea_wodebaozhang"]; 79 | [cell.textLabel setText:@"我的保障"]; 80 | [cell.detailTextLabel setText:@""]; 81 | }else{ 82 | //4.0 83 | cell.imageView.image=[UIImage imageNamed:@"Wea_aixinjuanzeng"]; 84 | [cell.textLabel setText:@"爱心捐赠"]; 85 | [cell.detailTextLabel setText:@""]; 86 | } 87 | return cell; 88 | } 89 | 90 | 91 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 92 | if (section==0) { 93 | return 1; 94 | }else if(section==1){ 95 | return 2; 96 | }else{ 97 | return 1; 98 | } 99 | } 100 | 101 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 102 | if (indexPath.section==0){ 103 | return 77.; 104 | }else{ 105 | return 49.; 106 | } 107 | } 108 | 109 | -(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ 110 | return 16; 111 | } 112 | 113 | -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ 114 | return 5; 115 | } 116 | 117 | 118 | 119 | 120 | @end 121 | -------------------------------------------------------------------------------- /AlipayFinal/WidgetsVC/Widgets.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 66 | 73 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 111 | 118 | 125 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /AlipayFinal/WidgetsVC/WidgetsVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // WidgetsVC.h 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class WidgetsVC; 12 | 13 | //Widgets需要用到的代理 14 | @protocol WidegetsVCDelegate 15 | //LoginView专用 16 | -(void)WidgetsVC:(WidgetsVC *)widgetsVC loginOK:(id)nilplaceholder; 17 | 18 | @end 19 | 20 | @interface WidgetsVC : UIViewController 21 | 22 | //一个falg,用于判断显示哪个view 23 | @property (weak,nonatomic) NSString * whichViewToPresent; 24 | 25 | //LoginView 26 | -(void)showLoginView; 27 | @property (strong, nonatomic) IBOutlet UIControl *loginView; 28 | @property (weak, nonatomic) IBOutlet UITextField *textField_username; 29 | @property (weak, nonatomic) IBOutlet UITextField *textField_password; 30 | @property (weak, nonatomic) IBOutlet UILabel *label_detail; 31 | @property (weak,nonatomic) id delegate; 32 | - (IBAction)login:(id)sender; 33 | -(void)resignFirstResponder4textField:(id)sender; 34 | -(void)resignFirstResponder4LoginView; 35 | @end 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /AlipayFinal/WidgetsVC/WidgetsVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // WidgetsVC.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-12. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import "WidgetsVC.h" 10 | 11 | @interface WidgetsVC () 12 | 13 | @end 14 | 15 | @implementation WidgetsVC 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | 30 | } 31 | 32 | -(void)viewDidAppear:(BOOL)animated{ 33 | //判断显示那个view 34 | if ([self.whichViewToPresent isEqualToString:@"loginView"]) { 35 | [self showLoginView]; 36 | }else{ //以后添加 37 | return ; 38 | } 39 | } 40 | 41 | - (void)didReceiveMemoryWarning 42 | { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | #pragma mark LoginView 48 | -(void)showLoginView{ 49 | //显示loginview 50 | self.view=self.loginView; 51 | //绑定事件 52 | [self.textField_username addTarget:self action:@selector(resignFirstResponder4textField:) forControlEvents:UIControlEventEditingDidEndOnExit]; 53 | [self.textField_password addTarget:self action:@selector(resignFirstResponder4textField:) forControlEvents:UIControlEventEditingDidEndOnExit]; 54 | [self.loginView addTarget:self action:@selector(resignFirstResponder4LoginView) forControlEvents:UIControlEventTouchDown]; 55 | //隐藏label 56 | self.label_detail.text=@""; 57 | } 58 | 59 | 60 | - (IBAction)login:(id)sender { 61 | NSString * username=self.textField_username.text; 62 | NSString * password=self.textField_password.text; 63 | 64 | if ([username isEqualToString:@"user00"] && [password isEqualToString:@"00user"]) { 65 | self.label_detail.text=@"输入正确"; 66 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"key_isLogined"]; 67 | [[NSUserDefaults standardUserDefaults] synchronize]; 68 | [self.delegate WidgetsVC:self loginOK:nil]; 69 | }else{ 70 | self.label_detail.text=@"账号或密码错误,请重新输入"; 71 | } 72 | } 73 | 74 | -(void)resignFirstResponder4textField:(id)sender{ 75 | [sender resignFirstResponder]; 76 | } 77 | 78 | -(void)resignFirstResponder4LoginView{ 79 | [self.textField_password resignFirstResponder]; 80 | [self.textField_username resignFirstResponder]; 81 | } 82 | @end 83 | -------------------------------------------------------------------------------- /AlipayFinal/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /AlipayFinal/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AlipayFinal 4 | // 5 | // Created by wushuyu on 14-11-11. 6 | // Copyright (c) 2014年 wsy.Inc. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_pay_new@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_pay_new@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_pay_new_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_pay_new_highlight@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_scan_new@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_scan_new@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_scan_new_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHome.bundle/ap_home_top_icon_scan_new_highlight@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/09999976.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/09999976.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/09999988.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/09999988.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/09999999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/09999999.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000003.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000004.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000006.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000008.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000009.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000011.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000014.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/10000033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/10000033.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/11000002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/11000002.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000032.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000032.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000046.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000046.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000066.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000066.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000078.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000078.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000094.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000094.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000119.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000119.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000120.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000123.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000123.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000130.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000130.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000131.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000131.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000132.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000134.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000134.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000150.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000155.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000155.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/20000168.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/20000168.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/2013080300000698.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/2013080300000698.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/2013082800000932.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/2013082800000932.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/30000001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/30000001.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/AlipayHomeIcons.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 转账 6 | 09999988.png 7 | 信用卡还款 8 | 09999999.png 9 | 当面付 10 | 10000014.png 11 | 余额宝 12 | 20000032.png 13 | 机票 14 | 20000094.png 15 | 水电煤 16 | 09999976.png 17 | 手机充值 18 | 10000003.png 19 | 亲密付 20 | 20000132.png 21 | 淘宝 22 | 2013082800000932.png 23 | 股票行情 24 | 20000134.png 25 | 彩票 26 | 10000011.png 27 | 汇率转换 28 | 20000150.png 29 | AA收款 30 | 20000066.png 31 | 淘点点 32 | 20000120.png 33 | 游戏充值 34 | 10000006.png 35 | 爱心捐赠 36 | 10000009.png 37 | 旅游特惠 38 | 20000155.png 39 | 40 | 41 | -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/app_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/app_add.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/app_item_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/app_item_bg.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/app_item_pressed_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/app_item_pressed_bg.png -------------------------------------------------------------------------------- /AlipayFinal/resources/AlipayHomeIcons.bundle/bill_history@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/AlipayHomeIcons.bundle/bill_history@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/09999998@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/09999998@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/20000032@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/20000032@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/ABC@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/ABC@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/BOC@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/BOC@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/Home_appfrag_blance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/Home_appfrag_blance.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/PSBC@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/PSBC@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/SPABANK@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/Services.bundle/SPABANK@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/Services.bundle/Services.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iconFileName 7 | SPABANK.png 8 | title 9 | 平安银行信用卡 10 | detail 11 | 12 | 13 | 14 | iconFileName 15 | 20000032.png 16 | title 17 | 余额宝 18 | detail 19 | 双11买车劲省30万,余额宝付定金还... 20 | 21 | 22 | iconFileName 23 | ABC.png 24 | title 25 | 中国农业银行 26 | detail 27 | 28 | 29 | 30 | iconFileName 31 | BOC.png 32 | title 33 | 工商银行 34 | detail 35 | 36 | 37 | 38 | iconFileName 39 | 09999998.png 40 | title 41 | 电话 42 | detail 43 | 这里是电话啊啊啊!!! 44 | 45 | 46 | iconFileName 47 | PSBC.png 48 | title 49 | 邮政储蓄银行 50 | detail 51 | 52 | 53 | 54 | iconFileName 55 | 20000032.png 56 | title 57 | 余额宝 58 | detail 59 | 呵呵又是余额宝,找不到那么多图片啊 60 | 61 | 62 | iconFileName 63 | 20000032.png 64 | title 65 | 余额宝 66 | detail 67 | 呵呵又是余额宝,找不到那么多图片啊 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /AlipayFinal/resources/splash@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/splash@2x.jpg -------------------------------------------------------------------------------- /AlipayFinal/resources/splashR4@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/splashR4@2x.jpg -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/cf财富@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/cf财富@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/cf财富_sel@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/cf财富_sel@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/fw服务窗@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/fw服务窗@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/fw服务窗_sel@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/fw服务窗_sel@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/ts探索@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/ts探索@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/ts探索_sel@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/ts探索_sel@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/zfb支付宝@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/zfb支付宝@2x.png -------------------------------------------------------------------------------- /AlipayFinal/resources/tabbed_icon.bundle/zfb支付宝_sel@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/summer-wu/iOSAlipayUI/298f9a1f3de06f601441df09b8f4ed9bbf051305/AlipayFinal/resources/tabbed_icon.bundle/zfb支付宝_sel@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iOSAlipayUI 2 | =================================== 3 | 提示 4 | ----------------------------------- 5 | 本app主要演示了: 6 | 动态显示splashimage 7 | 8 | 如何控制手势密码(AES加密保存数据) 9 | 10 | 如何控制viewcontroller之间的跳转,viewcontroller的代理控制。 11 | 12 | TabbarController与navigationControlle结合使用 13 | 14 | 动态显示splashimage 15 | 16 | 定制tableViewController 17 | 18 | 自定义UIButton 19 | 20 | 21 | ### 效果图 22 | 本app已打包发布到蒲公英平台,网址:[http://www.pgyer.com/syD6](http://www.pgyer.com/syD6)。可直接安装(无需越狱)查看效果. 23 | 24 | 25 | ![github](http://app-screenshot.pgyer.com/image/view/app_screenshots/63ff33cf71fbfdbda202035685e35f8c/528 "github") ![github](http://app-screenshot.pgyer.com/image/view/app_screenshots/36336bd4035d0eb18a5813464f8c4f88/528 "github") ![github](http://app-screenshot.pgyer.com/image/view/app_screenshots/10248c71342cf87600d10b61a9d1008d/528 "github") ![github](http://app-screenshot.pgyer.com/image/view/app_screenshots/731de99ee5269cc97776cae569b597e3/528 "github") 26 | 27 | --------------------------------------------------------------------------------