Skip to content

Commit

Permalink
1. APP名称修改为MyCC98
Browse files Browse the repository at this point in the history
2. 添加“服务条款”页面,方式为修改原“关于”页面
3. 代理地址在登录页面填写,不再内嵌到代码中
4. 只在网络不可用时进行提醒
5. 修改HUD的使用方式,原方式会造成VIEW泄漏
6. 部分页面添加HUD
7. 添加“举报用户”功能,以及对应的“举报”页面
  • Loading branch information
lunarfire committed Dec 18, 2015
1 parent d376cc1 commit 1e53605
Show file tree
Hide file tree
Showing 32 changed files with 766 additions and 151 deletions.
48 changes: 36 additions & 12 deletions CC98Lite.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
128906CE1B1CBB0200972946 /* CC98BlockListTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 128906CD1B1CBB0200972946 /* CC98BlockListTableViewController.m */; };
128906D91B1CD9DC00972946 /* CC98BlockListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 128906D81B1CD9DC00972946 /* CC98BlockListTableViewCell.m */; };
128B71EF1B12012A00B87B99 /* CC98Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 128B71EE1B12012A00B87B99 /* CC98Client.m */; };
128BFED61C21B7EE002D1C9F /* CC98ReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 128BFED51C21B7EE002D1C9F /* CC98ReportViewController.m */; };
12923DA71B57DC2900DB67E8 /* CC98AboutViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 12923DA61B57DC2900DB67E8 /* CC98AboutViewController.m */; };
1296D4101B89F84E00E358A2 /* SystemUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = 1296D40F1B89F84E00E358A2 /* SystemUtility.m */; };
1298081C1B2A053D00ACEBD0 /* UIViewController+BackButtonHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 1298081B1B2A053D00ACEBD0 /* UIViewController+BackButtonHandler.m */; };
Expand Down Expand Up @@ -252,6 +253,8 @@
128906D81B1CD9DC00972946 /* CC98BlockListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CC98BlockListTableViewCell.m; path = Views/CC98BlockListTableViewCell.m; sourceTree = "<group>"; };
128B71ED1B12012A00B87B99 /* CC98Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC98Client.h; path = Models/CC98Client.h; sourceTree = "<group>"; };
128B71EE1B12012A00B87B99 /* CC98Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CC98Client.m; path = Models/CC98Client.m; sourceTree = "<group>"; };
128BFED41C21B7EE002D1C9F /* CC98ReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC98ReportViewController.h; path = Controllers/CC98ReportViewController.h; sourceTree = "<group>"; };
128BFED51C21B7EE002D1C9F /* CC98ReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CC98ReportViewController.m; path = Controllers/CC98ReportViewController.m; sourceTree = "<group>"; };
12923DA51B57DC2900DB67E8 /* CC98AboutViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CC98AboutViewController.h; path = Controllers/CC98AboutViewController.h; sourceTree = "<group>"; };
12923DA61B57DC2900DB67E8 /* CC98AboutViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CC98AboutViewController.m; path = Controllers/CC98AboutViewController.m; sourceTree = "<group>"; };
1296D40E1B89F84E00E358A2 /* SystemUtility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemUtility.h; path = Utilities/SystemUtility.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -474,6 +477,8 @@
125C839F1B4179EF00FF96D5 /* CC98SettingsTableViewController.m */,
12923DA51B57DC2900DB67E8 /* CC98AboutViewController.h */,
12923DA61B57DC2900DB67E8 /* CC98AboutViewController.m */,
128BFED41C21B7EE002D1C9F /* CC98ReportViewController.h */,
128BFED51C21B7EE002D1C9F /* CC98ReportViewController.m */,
);
name = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -639,15 +644,16 @@
12564C3E1B11F1A700EC2FB0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = zju;
TargetAttributes = {
12564C451B11F1A700EC2FB0 = {
CreatedOnToolsVersion = 6.3.2;
DevelopmentTeam = LL4U63W87C;
DevelopmentTeam = M2D2QA28AH;
};
12564C611B11F1A700EC2FB0 = {
CreatedOnToolsVersion = 6.3.2;
DevelopmentTeam = M2D2QA28AH;
TestTargetID = 12564C451B11F1A700EC2FB0;
};
};
Expand Down Expand Up @@ -746,6 +752,7 @@
128906CE1B1CBB0200972946 /* CC98BlockListTableViewController.m in Sources */,
127495B71B2586C400BD07CE /* CC98RegexRepository.m in Sources */,
128906CB1B1CA60A00972946 /* CC98CommonPartition.m in Sources */,
128BFED61C21B7EE002D1C9F /* CC98ReportViewController.m in Sources */,
1284158F1B1380580043D1F6 /* CC98Topic.m in Sources */,
127495AB1B25395C00BD07CE /* NSError+CC98Style.m in Sources */,
128906D91B1CD9DC00972946 /* CC98BlockListTableViewCell.m in Sources */,
Expand Down Expand Up @@ -869,10 +876,12 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: Fang Zhou (5E9882VSK9)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fang Zhou (5E9882VSK9)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -888,9 +897,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE = "f912936d-a9bc-4588-8ff0-eeb43f048a2d";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -913,7 +923,8 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution: Fang Zhou (M2D2QA28AH)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Fang Zhou (M2D2QA28AH)";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -926,9 +937,10 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
PROVISIONING_PROFILE = "f912936d-a9bc-4588-8ff0-eeb43f048a2d";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -940,12 +952,14 @@
baseConfigurationReference = 7F1FC99458C58D53D9847F72 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Developer: Fang Zhou (5E9882VSK9)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Fang Zhou (5E9882VSK9)";
INFOPLIST_FILE = CC98Lite/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iZJU.MyCC98;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f912936d-a9bc-4588-8ff0-eeb43f048a2d";
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
Expand All @@ -955,12 +969,14 @@
baseConfigurationReference = 958C2F9BFD45764512459F82 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "iPhone Distribution: Fang Zhou (M2D2QA28AH)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Fang Zhou (M2D2QA28AH)";
INFOPLIST_FILE = CC98Lite/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iZJU.MyCC98;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "f912936d-a9bc-4588-8ff0-eeb43f048a2d";
TARGETED_DEVICE_FAMILY = 1;
};
name = Release;
Expand All @@ -969,6 +985,8 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
Expand All @@ -979,7 +997,9 @@
);
INFOPLIST_FILE = CC98LiteTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.zju.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CC98Lite.app/CC98Lite";
};
name = Debug;
Expand All @@ -988,13 +1008,17 @@
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = CC98LiteTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.zju.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CC98Lite.app/CC98Lite";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.8">
LastUpgradeVersion = "0720"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -37,10 +37,10 @@
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -66,11 +66,11 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
Expand All @@ -89,10 +89,10 @@
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
Binary file not shown.
33 changes: 31 additions & 2 deletions CC98Lite/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[self insertHotTopicListInTabBar];
[self insertControlPanelInTabBar];

[self checkNetworkStatus:[CC98Client addressString]];
[self checkNetworkStatus];
return YES;
}

Expand All @@ -63,6 +63,15 @@ - (void)showInfoDialog:(NSString *)info {
}

- (void)showReachabilityDialog {
switch (self.hostReachability.currentReachabilityStatus) {
case NotReachable: // 目前只在网络不可用时进行提示
[self showInfoDialog:@"当前网络不可用,请检查网络连接"];
break;
default:
break;
}

/*
switch (self.hostReachability.currentReachabilityStatus) {
case NotReachable:
[self showInfoDialog:@"无法访问CC98"];
Expand All @@ -76,6 +85,7 @@ - (void)showReachabilityDialog {
default:
break;
}
*/
}

- (void)subscribeNetworkingNotification {
Expand All @@ -92,7 +102,25 @@ - (void)setNetworkingTimeoutInterval:(NSTimeInterval)timeout {
[[[CC98Client sharedInstance] requestSerializer] didChangeValueForKey:@"timeoutInterval"];
}

- (void)checkNetworkStatus:(NSString *)address {
- (void)checkNetworkStatus {
self.hostReachability = [Reachability reachabilityForInternetConnection];

if (self.hostReachability.currentReachabilityStatus == NotReachable) {
[self showReachabilityDialog];
} else {
CC98Account *account = [[CC98Client sharedInstance] currentAccount];
if (account == nil) {
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
tabBarController.selectedIndex = 2;
} else {
[account loginWithBlock:nil];
}
}

// 订阅网络状态变化的通知
[self subscribeNetworkingNotification];

/*
self.hostReachability = [Reachability reachabilityWithHostName:address];
if (self.hostReachability.currentReachabilityStatus == NotReachable) {
Expand Down Expand Up @@ -128,6 +156,7 @@ - (void)checkNetworkStatus:(NSString *)address {
[weakSelf setNetworkingTimeoutInterval:defaultTimeoutInterval];
}];
}];
*/
}

- (void)reachabilityChanged:(NSNotification *)note
Expand Down
11 changes: 6 additions & 5 deletions CC98Lite/Base.lproj/LaunchScreen.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="14F1509" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
Expand All @@ -14,13 +15,13 @@
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copyright (c) 2015年 小林. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CC98Lite" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="MyCC98" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand Down
Loading

0 comments on commit 1e53605

Please sign in to comment.