添加筛选

This commit is contained in:
wu736139669
2015-06-28 17:11:43 +08:00
parent 6c9b49e9a9
commit 5d25917750
28 changed files with 1002 additions and 23 deletions
+42
View File
@@ -367,6 +367,13 @@
A9DAB9A21B3FC1240008E30B /* MessageSetTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DAB9A01B3FC1240008E30B /* MessageSetTableViewCell.m */; };
A9DAB9A31B3FC1240008E30B /* MessageSetTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9DAB9A11B3FC1240008E30B /* MessageSetTableViewCell.xib */; };
A9DABA301B3FCF800008E30B /* libEaseMobClientSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9DABA2B1B3FCE870008E30B /* libEaseMobClientSDK.a */; };
A9DABA341B3FD98F0008E30B /* EMAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DABA331B3FD98F0008E30B /* EMAlertView.m */; };
A9DABA361B3FDFFC0008E30B /* Profile_filter_down@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9DABA351B3FDFFC0008E30B /* Profile_filter_down@2x.png */; };
A9DABA381B3FE2660008E30B /* Profile_filter_upClick@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A9DABA371B3FE2660008E30B /* Profile_filter_upClick@2x.png */; };
A9DABA3B1B3FE4A50008E30B /* TypeSelectView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DABA3A1B3FE4A50008E30B /* TypeSelectView.m */; };
A9DABA3D1B3FE4B80008E30B /* TypeSelectView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9DABA3C1B3FE4B80008E30B /* TypeSelectView.xib */; };
A9DABA401B3FE6F30008E30B /* TypeSelectBgView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9DABA3F1B3FE6F30008E30B /* TypeSelectBgView.m */; };
A9DABA421B3FE6FD0008E30B /* TypeSelectBgView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9DABA411B3FE6FD0008E30B /* TypeSelectBgView.xib */; };
A9E2711B1ADB97ED000B1542 /* Default-568h.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E271191ADB97ED000B1542 /* Default-568h.png */; };
A9E2711C1ADB97ED000B1542 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = A9E2711A1ADB97ED000B1542 /* Default.png */; };
A9E2711E1ADBB25C000B1542 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9E2711D1ADBB25C000B1542 /* AVFoundation.framework */; };
@@ -1005,6 +1012,16 @@
A9DAB9A01B3FC1240008E30B /* MessageSetTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageSetTableViewCell.m; sourceTree = "<group>"; };
A9DAB9A11B3FC1240008E30B /* MessageSetTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MessageSetTableViewCell.xib; sourceTree = "<group>"; };
A9DABA2B1B3FCE870008E30B /* libEaseMobClientSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libEaseMobClientSDK.a; sourceTree = "<group>"; };
A9DABA321B3FD98F0008E30B /* EMAlertView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EMAlertView.h; sourceTree = "<group>"; };
A9DABA331B3FD98F0008E30B /* EMAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EMAlertView.m; sourceTree = "<group>"; };
A9DABA351B3FDFFC0008E30B /* Profile_filter_down@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Profile_filter_down@2x.png"; sourceTree = "<group>"; };
A9DABA371B3FE2660008E30B /* Profile_filter_upClick@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Profile_filter_upClick@2x.png"; sourceTree = "<group>"; };
A9DABA391B3FE4A50008E30B /* TypeSelectView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSelectView.h; sourceTree = "<group>"; };
A9DABA3A1B3FE4A50008E30B /* TypeSelectView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TypeSelectView.m; sourceTree = "<group>"; };
A9DABA3C1B3FE4B80008E30B /* TypeSelectView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TypeSelectView.xib; sourceTree = "<group>"; };
A9DABA3E1B3FE6F30008E30B /* TypeSelectBgView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeSelectBgView.h; sourceTree = "<group>"; };
A9DABA3F1B3FE6F30008E30B /* TypeSelectBgView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TypeSelectBgView.m; sourceTree = "<group>"; };
A9DABA411B3FE6FD0008E30B /* TypeSelectBgView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TypeSelectBgView.xib; sourceTree = "<group>"; };
A9E271191ADB97ED000B1542 /* Default-568h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h.png"; sourceTree = "<group>"; };
A9E2711A1ADB97ED000B1542 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
A9E2711D1ADBB25C000B1542 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
@@ -1900,6 +1917,7 @@
A97C54D91AC9014D0038818A /* Vender */ = {
isa = PBXGroup;
children = (
A9DABA311B3FD98F0008E30B /* EMAlertView */,
A9744EDF1B3155150082301D /* EaseMobSDK */,
A96D2F231B2FFD9C00DC0284 /* DejalActivityView */,
A9A3A7551B281392001AAB3A /* CExpandHeader */,
@@ -1943,6 +1961,8 @@
children = (
A9C58DAE1B3AA8EC0007FCDC /* audio */,
A9F7F4581B33B51F00317F3E /* back@2x.png */,
A9DABA371B3FE2660008E30B /* Profile_filter_upClick@2x.png */,
A9DABA351B3FDFFC0008E30B /* Profile_filter_down@2x.png */,
A97D70F11B3E3BAB0070BE84 /* acitvity_center_new@2x.png */,
A971EDF61B32B7C40023740E /* chatBar_colorMore_audioCall@2x.png */,
A971EDF71B32B7C40023740E /* chatBar_colorMore_audioCallSelected@2x.png */,
@@ -2379,10 +2399,25 @@
A9DAB99F1B3FC1240008E30B /* MessageSetTableViewCell.h */,
A9DAB9A01B3FC1240008E30B /* MessageSetTableViewCell.m */,
A9DAB9A11B3FC1240008E30B /* MessageSetTableViewCell.xib */,
A9DABA391B3FE4A50008E30B /* TypeSelectView.h */,
A9DABA3A1B3FE4A50008E30B /* TypeSelectView.m */,
A9DABA3C1B3FE4B80008E30B /* TypeSelectView.xib */,
A9DABA3E1B3FE6F30008E30B /* TypeSelectBgView.h */,
A9DABA3F1B3FE6F30008E30B /* TypeSelectBgView.m */,
A9DABA411B3FE6FD0008E30B /* TypeSelectBgView.xib */,
);
path = Common;
sourceTree = "<group>";
};
A9DABA311B3FD98F0008E30B /* EMAlertView */ = {
isa = PBXGroup;
children = (
A9DABA321B3FD98F0008E30B /* EMAlertView.h */,
A9DABA331B3FD98F0008E30B /* EMAlertView.m */,
);
path = EMAlertView;
sourceTree = "<group>";
};
A9F7F45A1B33BC4E00317F3E /* Call */ = {
isa = PBXGroup;
children = (
@@ -2558,6 +2593,7 @@
A90BA0191AD6067F00728393 /* voice-continue-record-bgN@2x.png in Resources */,
A9C58DF81B3AA8EC0007FCDC /* VoiceSearchFeedback009@2x.png in Resources */,
A978CB291B3A3D5A00028C4A /* chat_sender_audio_playing_000@2x.png in Resources */,
A9DABA3D1B3FE4B80008E30B /* TypeSelectView.xib in Resources */,
A97C55001AC933AD0038818A /* UMSCommentDetailController.xib in Resources */,
A93441F21ACA916D00A6B233 /* tabbarQuotationClick@2x.png in Resources */,
A90BA0011AD6031E00728393 /* MessagePublishViewController.xib in Resources */,
@@ -2679,6 +2715,7 @@
A971EDF51B32B7AF0023740E /* chatBar_more_photoSelected@2x.png in Resources */,
A97559C51ACBEE99004ADA42 /* NoteTableViewCell.xib in Resources */,
A90BA0151AD6066000728393 /* voice-bottom-sure@2x.png in Resources */,
A9DABA381B3FE2660008E30B /* Profile_filter_upClick@2x.png in Resources */,
A971EDDD1B32B7960023740E /* chatBar_faceSelected@2x.png in Resources */,
A9CF212A1B1C65A2007490EF /* praise-wall-white@2x.png in Resources */,
A9617A551ACC27860024AE4A /* SetUpViewController.xib in Resources */,
@@ -2733,6 +2770,7 @@
A9C58DE31B3AA8EC0007FCDC /* chatFire_audioPlaying2.png in Resources */,
A98536731AEB66F9000312BF /* ReportViewController.xib in Resources */,
A9C58DF61B3AA8EC0007FCDC /* VoiceSearchFeedback008@2x.png in Resources */,
A9DABA421B3FE6FD0008E30B /* TypeSelectBgView.xib in Resources */,
A97C55011AC933AD0038818A /* UMSCommentInputController.xib in Resources */,
A971EE0D1B32B7C40023740E /* chatBar_colorMore_videoSelected@2x.png in Resources */,
A97559AD1ACB9DF0004ADA42 /* navigationButtonRefreshClick@2x.png in Resources */,
@@ -2784,6 +2822,7 @@
A9FD82B71B1D433800AC4DC9 /* accessory@2x.png in Resources */,
A9C58E001B3AA8EC0007FCDC /* VoiceSearchFeedback013@2x.png in Resources */,
A9C58DFA1B3AA8EC0007FCDC /* VoiceSearchFeedback010@2x.png in Resources */,
A9DABA361B3FDFFC0008E30B /* Profile_filter_down@2x.png in Resources */,
A90BA01B1AD6069A00728393 /* voice-play-start@2x.png in Resources */,
A9C58DE71B3AA8EC0007FCDC /* VoiceSearchFeedback001.png in Resources */,
A978CB361B3A3D6700028C4A /* chat_receiver_audio_playing000@2x.png in Resources */,
@@ -2845,6 +2884,7 @@
A9FAD4271AC922BE007ADC10 /* NoteViewController.m in Sources */,
A97559A01ACB88FE004ADA42 /* AWordDefault.m in Sources */,
A97C54D31AC8F10F0038818A /* XiaoYuAPIClient.m in Sources */,
A9DABA341B3FD98F0008E30B /* EMAlertView.m in Sources */,
A9CF21211B1C4C70007490EF /* NoteCommentViewController.m in Sources */,
A9F917C51B39055A0007A3AC /* EMChatImageBubbleView.m in Sources */,
A97559C41ACBEE99004ADA42 /* NoteTableViewCell.m in Sources */,
@@ -2861,6 +2901,7 @@
A971EDB31B32B5740023740E /* EMCDDeviceManager+Media.m in Sources */,
A9754A1F1ADC080E0018BAAD /* DataSource.m in Sources */,
A971EDB41B32B5740023740E /* EMCDDeviceManager+Microphone.m in Sources */,
A9DABA3B1B3FE4A50008E30B /* TypeSelectView.m in Sources */,
A97C54DD1AC901980038818A /* MBProgressHUD+Util.m in Sources */,
A96D2F261B2FFDA300DC0284 /* DejalActivityView.m in Sources */,
A9F917DA1B390A220007A3AC /* NSDateFormatter+Category.m in Sources */,
@@ -2923,6 +2964,7 @@
A9DAB9A21B3FC1240008E30B /* MessageSetTableViewCell.m in Sources */,
A9754A211ADC080E0018BAAD /* HttpDataSource.m in Sources */,
A9754A201ADC080E0018BAAD /* DataSourceWrapper.m in Sources */,
A9DABA401B3FE6F30008E30B /* TypeSelectBgView.m in Sources */,
A97B1A3C1B3FA80E00D538F9 /* MessageSetViewController.m in Sources */,
A9F917D71B39091A0007A3AC /* NSDate+Category.m in Sources */,
A971EDB71B32B5740023740E /* EMCDDeviceManagerBase.m in Sources */,
@@ -186,7 +186,7 @@
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/ViewControllers/My/MyRelateViewController.m"
timestampString = "457166929.62068"
timestampString = "457175493.973235"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "152"
@@ -201,7 +201,7 @@
moduleName = "Ash_AWord"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/xmfish/Documents/Ash_Soft/Ash_AWord/Ash_AWord/ViewControllers/My/MyRelateViewController.m"
timestampString = "457166929.621048"
timestampString = "457175493.973457"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "152"
@@ -259,5 +259,117 @@
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/My/MessageSetViewController.m"
timestampString = "457170353.131458"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "114"
endingLineNumber = "114"
landmarkName = "-tableView:cellForRowAtIndexPath:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/My/MessageSetViewController.m"
timestampString = "457170353.131458"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "71"
endingLineNumber = "71"
landmarkName = "-refreshPushOptions"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/My/MessageSetViewController.m"
timestampString = "457170353.131458"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "70"
endingLineNumber = "70"
landmarkName = "-refreshPushOptions"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Views/Common/TypeSelectBgView.m"
timestampString = "457174545.060674"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
landmarkName = "-hide"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewControllers/Main/NoteViewController.m"
timestampString = "457175065.52738"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "87"
endingLineNumber = "87"
landmarkName = "-selectTypeBtn:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/ViewModels/Note/NoteViewModel.m"
timestampString = "457174882.428908"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "81"
endingLineNumber = "81"
landmarkName = "+requireWithOrder_by:withPage:withPage_size:withType:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Ash_AWord/Utility/Network/PropertyEntity.m"
timestampString = "457175180.718528"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "41"
endingLineNumber = "41"
landmarkName = "-encodePro"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -8,7 +8,10 @@
"Saving" = "Saving";
"SaveFailed" = "SaveFailed";
"Saved" = "Saved";
"sure" = "OK";
"yes" = "YES";
"cancel" = "Cancel";
"no" = "NO";
//message
"message.image" = "image";
"message.location" = "location";
@@ -75,3 +78,33 @@
"NSDateCategory.text12" = "aa hh:mm";
"NSDateCategory.text13" = "M-d HH:mm";
"NSDateCategory.text14" = "today %@";
//setting
"setting.autoLogin" = "automatic login";
"setting.loginUser" = "log out(%@)";
"setting.logoutOngoing" = "loging out...";
"setting.notDisturb" = "No disturbing";
"setting.showDetail" = "display message details in apns";
"setting.open" = "open";
"setting.nightOpen" = "only open at night (22:00 - 7:00)";
"setting.close" = "close";
"setting.sureNotDisturb" = "this setting will cause all day in the don't disturb mode, will no longer receive push messages. Whether or not to continue?";
"setting.uploadLog" = "upload run log";
"setting.sdkVersion" = "SDK version";
"setting.uploading" = "uploading...";
"setting.uploadSuccess" = "uploaded successfully";
"setting.editName" = "Edit NickName";
"setting.inputName" = "Please input nickname";
"setting.saveName" = "Save Nickname";
"setting.namenotempty" = "Name cannot be empty";
"setting.edittips" = "After setting this nickname, chat with the iOS client demo project, iOS will display this nickname is not a EaseMob ID, if the other party to use the Android client this setting is not effective";
"setting.iospushname" = "iOS push nickname";
"setting.useIp" = "Use IP";
"setting.deleteConWhenLeave" = "Delete conversation when leave a group";
"setting.microphoneNoAuthority" = "No microphone permissions";
"setting.microphoneAuthority" = "Please open in \"Setting\"-\"Privacy\"-\"Microphone\".";
"setting.cameraNoAuthority" = "No camera permissions";
"setting.cameraAuthority" = "Please open in \"Setting\"-\"Privacy\"-\"Camera\".";
@@ -9,6 +9,11 @@
"Saving" = "保存中";
"SaveFailed" = "保存失败";
"Saved" = "保存成功";
"save" = "保存";
"ok" = "确定";
"yes" = "是";
"cancel" = "取消";
"no" = "否";
//message
"message.image" = "图片";
@@ -60,6 +65,34 @@
"location.fail" = "定位失败";
"location.ongoning" = "正在定位...";
//setting
"setting.autoLogin" = "自动登录";
"setting.loginUser" = "退出登录(%@)";
"setting.logoutOngoing" = "正在退出...";
"setting.notDisturb" = "功能消息免打扰";
"setting.showDetail" = "通知显示消息详情";
"setting.open" = "开启";
"setting.nightOpen" = "只在夜间开启 (22:00 - 7:00)";
"setting.close" = "关闭";
"setting.sureNotDisturb" = "此设置会导致全天都处于免打扰模式, 不会再收到推送消息. 是否继续?";
"setting.uploadLog" = "上传运行日志";
"setting.sdkVersion" = "SDK 版本";
"setting.uploading" = "正在上传...";
"setting.uploadSuccess" = "上传成功";
"setting.editName" = "更改昵称";
"setting.inputName" = "请输入新昵称";
"setting.saveName" = "保存更改昵称";
"setting.namenotempty" = "昵称不能为空";
"setting.edittips" = "设置此昵称以后,在与iOS客户端demo聊天工程中,iOS一侧会显示此昵称而不是环信ID,如果对方使用安卓客户端则此设置不生效";
"setting.iospushname" = "iOS离线推送昵称";
"setting.useIp" = "使用IP";
"setting.deleteConWhenLeave" = "退群时删除会话";
"setting.microphoneNoAuthority" = "未获得授权使用麦克风";
"setting.microphoneAuthority" = "请在iOS\"设置中\"-\"隐私\"-\"麦克风\"中打开";
"setting.cameraNoAuthority" = "未获得授权使用相机";
"setting.cameraAuthority" = "请在iOS\"设置中\"-\"隐私\"-\"相机\"中打开";
//NSDateCategory
"NSDateCategory.text1" = "1分钟内";
@@ -0,0 +1,30 @@
//
// EMAlertView.h
// AlertView
//
// Created by EaseMob on 15/4/1.
// Copyright (c) 2015年 EaseMob. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface EMAlertView : UIAlertView
/**
* 弹出提示框
*
* @param title <#title description#>
* @param message <#message description#>
* @param block <#block description#>
* @param cancelButtonTitle <#cancelButtonTitle description#>
* @param otherButtonTitles <#otherButtonTitles description#>
*
* @return <#return value description#>
*/
+ (id)showAlertWithTitle:(NSString *)title
message:(NSString *)message
completionBlock:(void (^)(NSUInteger buttonIndex, EMAlertView *alertView))block
cancelButtonTitle:(NSString *)cancelButtonTitle
otherButtonTitles:(NSString *)otherButtonTitles, ...;
@end
+103
View File
@@ -0,0 +1,103 @@
//
// EMAlertView.m
// AlertView
//
// Created by EaseMob on 15/4/1.
// Copyright (c) 2015年 EaseMob. All rights reserved.
//
#import "EMAlertView.h"
#import <objc/runtime.h>
@interface EMAlertView ()<UIAlertViewDelegate>
@end
@implementation EMAlertView
void EMNoTitleAlert(NSString* message) {
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:message
message:nil
delegate:nil
cancelButtonTitle:@"确定"
otherButtonTitles:nil];
[alert show];
}
+ (id)showAlertWithTitle:(NSString *)title message:(NSString *)message
completionBlock:(void (^)(NSUInteger buttonIndex, EMAlertView *alertView))block
cancelButtonTitle:(NSString *)cancelButtonTitle
otherButtonTitles:(NSString *)otherButtonTitles, ...
{
if (!cancelButtonTitle && !otherButtonTitles) {
return nil;
}
EMAlertView *alertView = [[self alloc] initWithTitle:title
message:message
completionBlock:block
cancelButtonTitle:cancelButtonTitle
otherButtonTitles:nil];
if (otherButtonTitles != nil) {
id eachObject;
va_list argumentList;
if (otherButtonTitles) {
[alertView addButtonWithTitle:otherButtonTitles];
va_start(argumentList, otherButtonTitles);
while ((eachObject = va_arg(argumentList, id))) {
[alertView addButtonWithTitle:eachObject];
}
va_end(argumentList);
}
}
[alertView show];
return alertView;
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
void (^block)(NSUInteger buttonIndex, UIAlertView *alertView) = objc_getAssociatedObject(self, "blockCallback");
if (block) {
block(buttonIndex, self);
}
}
- (id)initWithTitle:(NSString *)title
message:(NSString *)message
completionBlock:(void (^)(NSUInteger buttonIndex, EMAlertView *alertView))block
cancelButtonTitle:(NSString *)cancelButtonTitle
otherButtonTitles:(NSString *)otherButtonTitles, ... {
objc_setAssociatedObject(self, "blockCallback", [block copy], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
if (self = [self initWithTitle:title
message:message
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil]) {
if (cancelButtonTitle) {
[self addButtonWithTitle:cancelButtonTitle];
self.cancelButtonIndex = [self numberOfButtons] - 1;
}
id eachObject;
va_list argumentList;
if (otherButtonTitles) {
[self addButtonWithTitle:otherButtonTitles];
va_start(argumentList, otherButtonTitles);
while ((eachObject = va_arg(argumentList, id))) {
[self addButtonWithTitle:eachObject];
}
va_end(argumentList);
}
}
return self;
}
@end
@@ -76,7 +76,7 @@ static NSString *kMessageType = @"MessageType";
// Do any additional setup after loading the view from its nib.
[[UITableViewHeaderFooterView appearance] setTintColor:[UIColor clearColor]];
[[UITabBar appearance] setTintColor:[UIColor blackColor]];
[[UITabBar appearance] setTintColor:[UIColor appMainColor]];
[UIBarButtonItem.appearance setTintColor:[UIColor blackColor]];
[[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
@@ -12,12 +12,17 @@
#import "MessageTableViewCell.h"
#import "AudioPlayer.h"
#import "ReportViewController.h"
#import "TypeSelectView.h"
#import "TypeSelectBgView.h"
@interface MessageViewController ()<MessageTableViewCellDelegate>
{
NSInteger _page;
NSMutableArray* _text_voiceArr;
NSInteger _playIndex;
NSInteger _reportIndex;
TypeSelectView* _typeSelectView;
TypeSelectBgView* _typeSelectBgView;
NSInteger _type; //_type0 代表全部,1代表关注.
}
@end
@@ -32,6 +37,7 @@
_text_voiceArr = [[NSMutableArray alloc] init];
_playIndex = -1;
_reportIndex = -1;
_type = 0;
}
return self;
}
@@ -43,6 +49,20 @@
[self customViewDidLoad];
_typeSelectBgView = [Ash_UIUtil instanceXibView:@"TypeSelectBgView"];
_typeSelectBgView.frame = self.view.frame;
[self.view addSubview:_typeSelectBgView];
_typeSelectBgView.typeIndex = _type;
[_typeSelectBgView.allBtn addTarget:self action:@selector(selectTypeBtn:) forControlEvents:UIControlEventTouchUpInside];
[_typeSelectBgView.attentionBtn addTarget:self action:@selector(selectTypeBtn:) forControlEvents:UIControlEventTouchUpInside];
[_typeSelectBgView hide];
_typeSelectView = [Ash_UIUtil instanceXibView:@"TypeSelectView"];
[_typeSelectView.typeBtn addTarget:self action:@selector(showTypeSelect:) forControlEvents:UIControlEventTouchUpInside];
_typeSelectView.frame = CGRectMake(0, 0, 60, 40);
self.navigationItem.titleView = _typeSelectView;
self.navigationItem.title = @"听你说";
self.navigationItem.leftBarButtonItem = [Ash_UIUtil leftBarButtonItemWithTarget:self action:@selector(publish) image:[UIImage imageNamed:@"navigationButtonPublish"] highlightedImage:[UIImage imageNamed:@"navigationButtonPublishClick"]];
self.navigationItem.rightBarButtonItem = [Ash_UIUtil leftBarButtonItemWithTarget:self action:@selector(headerBeginRefreshing) image:[UIImage imageNamed:@"navigationButtonRefresh"] highlightedImage:[UIImage imageNamed:@"navigationButtonRefreshClick"]];
@@ -63,6 +83,30 @@
[menu setMenuItems:menuItems];
}
-(void)selectTypeBtn:(UIButton*)button
{
[_typeSelectBgView hide];
if (_type == button.tag) {
return;
}else{
_type = button.tag;
if (_type == 0) {
_typeSelectView.titleLabel.text = @"全部";
}else{
_typeSelectView.titleLabel.text = @"关注";
}
_typeSelectBgView.typeIndex = _type;
[self headerBeginRefreshing];
}
}
-(void)showTypeSelect:(id)sender
{
if (_typeSelectBgView.hidden) {
[_typeSelectBgView show];
}
}
-(void)longPressToDo:(UILongPressGestureRecognizer *)gesture
{
@@ -142,7 +186,7 @@
{
[MobClick event:kUmen_message];
PropertyEntity* pro = [MessageViewModel requireWithOrder_by:Order_by_Time withPage:_page withPage_size:20];
PropertyEntity* pro = [MessageViewModel requireWithOrder_by:Order_by_Time withPage:_page withPage_size:DefaultPageSize withType:_type];
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
MessageViewModel* noteViewModel = (MessageViewModel*)viewModel;
@@ -12,11 +12,16 @@
#import "NoteViewModel.h"
#import "UpdateViewModel.h"
#import "ReportViewController.h"
#import "TypeSelectView.h"
#import "TypeSelectBgView.h"
@interface NoteViewController ()<UIActionSheetDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,UIAlertViewDelegate,NoteTableViewCellDelegate>
{
NSInteger _page;
NSMutableArray* _text_imageArr;
NSInteger _reportIndex;
TypeSelectView* _typeSelectView;
TypeSelectBgView* _typeSelectBgView;
NSInteger _type; //_type0 代表全部,1代表关注.
}
@end
@@ -30,6 +35,7 @@
_page = 1;
_text_imageArr = [[NSMutableArray alloc] init];
_reportIndex = -1;
_type = 0;
}
return self;
}
@@ -42,6 +48,20 @@
self.navigationItem.title = @"遇见你";
_typeSelectBgView = [Ash_UIUtil instanceXibView:@"TypeSelectBgView"];
_typeSelectBgView.frame = self.view.frame;
[self.view addSubview:_typeSelectBgView];
_typeSelectBgView.typeIndex = _type;
[_typeSelectBgView.allBtn addTarget:self action:@selector(selectTypeBtn:) forControlEvents:UIControlEventTouchUpInside];
[_typeSelectBgView.attentionBtn addTarget:self action:@selector(selectTypeBtn:) forControlEvents:UIControlEventTouchUpInside];
[_typeSelectBgView hide];
_typeSelectView = [Ash_UIUtil instanceXibView:@"TypeSelectView"];
[_typeSelectView.typeBtn addTarget:self action:@selector(showTypeSelect:) forControlEvents:UIControlEventTouchUpInside];
_typeSelectView.frame = CGRectMake(0, 0, 60, 40);
self.navigationItem.titleView = _typeSelectView;
self.navigationItem.leftBarButtonItem = [Ash_UIUtil leftBarButtonItemWithTarget:self action:@selector(publish) image:[UIImage imageNamed:@"navigationButtonPublish"] highlightedImage:[UIImage imageNamed:@"navigationButtonPublishClick"]];
self.navigationItem.rightBarButtonItem = [Ash_UIUtil leftBarButtonItemWithTarget:self action:@selector(headerBeginRefreshing) image:[UIImage imageNamed:@"navigationButtonRefresh"] highlightedImage:[UIImage imageNamed:@"navigationButtonRefreshClick"]];
[self headerBeginRefreshing];
@@ -62,6 +82,29 @@
[menu setMenuItems:menuItems];
}
-(void)selectTypeBtn:(UIButton*)button
{
[_typeSelectBgView hide];
if (_type == button.tag) {
return;
}else{
_type = button.tag;
if (_type == 0) {
_typeSelectView.titleLabel.text = @"全部";
}else{
_typeSelectView.titleLabel.text = @"关注";
}
_typeSelectBgView.typeIndex = _type;
[self headerBeginRefreshing];
}
}
-(void)showTypeSelect:(id)sender
{
if (_typeSelectBgView.hidden) {
[_typeSelectBgView show];
}
}
-(void)longPressToDo:(UILongPressGestureRecognizer *)gesture
{
if(gesture.state == UIGestureRecognizerStateBegan)
@@ -164,7 +207,7 @@
{
[MobClick event:kUmen_note];
PropertyEntity* pro = [NoteViewModel requireWithOrder_by:Order_by_Time withPage:_page withPage_size:DefaultPageSize];
PropertyEntity* pro = [NoteViewModel requireWithOrder_by:Order_by_Time withPage:_page withPage_size:DefaultPageSize withType:_type];
[RequireEngine requireWithProperty:pro completionBlock:^(id viewModel) {
NoteViewModel* noteViewModel = (NoteViewModel*)viewModel;
@@ -7,9 +7,14 @@
//
#import "MessageSetViewController.h"
@interface MessageSetViewController ()
#import "MessageSetTableViewCell.h"
#import "EMAlertView.h"
@interface MessageSetViewController ()<UITableViewDelegate,UITableViewDataSource>
{
EMPushNotificationNoDisturbStatus _noDisturbingStatus;
NSInteger _noDisturbingStart;
NSInteger _noDisturbingEnd;
}
@end
@implementation MessageSetViewController
@@ -17,6 +22,57 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
[self customViewDidLoad];
self.title = @"消息推送设置";
_tableView.delegate = self;
_tableView.dataSource = self;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStyleDone target:self action:@selector(savePushOptions)];
_noDisturbingStart = -1;
_noDisturbingEnd = -1;
_noDisturbingStatus = -1;
[self refreshPushOptions];
[self.tableView reloadData];
}
#pragma mark - action
- (void)savePushOptions
{
BOOL isUpdate = NO;
EMPushNotificationOptions *options = [[EaseMob sharedInstance].chatManager pushNotificationOptions];
if (options.noDisturbingStartH != _noDisturbingStart || options.noDisturbingEndH != _noDisturbingEnd){
isUpdate = YES;
options.noDisturbStatus = _noDisturbingStatus;
options.noDisturbingStartH = _noDisturbingStart;
options.noDisturbingEndH = _noDisturbingEnd;
}
if (isUpdate) {
[[EaseMob sharedInstance].chatManager asyncUpdatePushOptions:options completion:^(EMPushNotificationOptions *options, EMError *error) {
if (!error) {
[MBProgressHUD checkHudWithView:self.view label:@"保存成功" hidesAfter:1.0];
}else{
[MBProgressHUD checkHudWithView:self.view label:@"服务器异常,保存失败" hidesAfter:1.0];
}
} onQueue:nil];
}
}
- (void)refreshPushOptions
{
EMPushNotificationOptions *options = [[EaseMob sharedInstance].chatManager pushNotificationOptions];
_noDisturbingStatus = options.noDisturbStatus;
if (_noDisturbingStatus != ePushNotificationNoDisturbStatusClose) {
_noDisturbingStart = options.noDisturbingStartH;
_noDisturbingEnd = options.noDisturbingEndH;
}
}
- (void)didReceiveMemoryWarning {
@@ -24,6 +80,106 @@
// Dispose of any resources that can be recreated.
}
#pragma mark UITableViewDelegate
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return 50;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return NSLocalizedString(@"setting.notDisturb", @"No disturbing");
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
return 30;
}
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString* cellIdentifier = @"MessageSetTableViewCell";
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
if (indexPath.row == 0) {
cell.textLabel.text = NSLocalizedString(@"setting.open", @"Open");
cell.accessoryType = _noDisturbingStatus == ePushNotificationNoDisturbStatusDay ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
}
else if (indexPath.row == 1)
{
cell.textLabel.text = NSLocalizedString(@"setting.nightOpen", @"only open at night (22:00 - 7:00)");
cell.accessoryType = _noDisturbingStatus == ePushNotificationNoDisturbStatusCustom ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
}
else if (indexPath.row == 2)
{
cell.textLabel.text = NSLocalizedString(@"setting.close", @"Close");
cell.accessoryType = _noDisturbingStatus == ePushNotificationNoDisturbStatusClose ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
BOOL needReload = YES;
switch (indexPath.row) {
case 0:
{
needReload = NO;
[EMAlertView showAlertWithTitle:NSLocalizedString(@"prompt", @"Prompt")
message:NSLocalizedString(@"setting.sureNotDisturb", @"this setting will cause all day in the don't disturb mode, will no longer receive push messages. Whether or not to continue?")
completionBlock:^(NSUInteger buttonIndex, EMAlertView *alertView) {
switch (buttonIndex) {
case 0: {
} break;
default: {
self->_noDisturbingStart = 0;
self->_noDisturbingEnd = 24;
self->_noDisturbingStatus = ePushNotificationNoDisturbStatusDay;
[tableView reloadData];
} break;
}
} cancelButtonTitle:NSLocalizedString(@"no", @"NO")
otherButtonTitles:NSLocalizedString(@"yes", @"YES"), nil];
} break;
case 1:
{
_noDisturbingStart = 22;
_noDisturbingEnd = 7;
_noDisturbingStatus = ePushNotificationNoDisturbStatusCustom;
}
break;
case 2:
{
_noDisturbingStart = -1;
_noDisturbingEnd = -1;
_noDisturbingStatus = ePushNotificationNoDisturbStatusClose;
}
break;
default:
break;
}
if (needReload) {
[tableView reloadData];
}
}
/*
#pragma mark - Navigation
@@ -16,9 +16,9 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" translatesAutoresizingMaskIntoConstraints="NO" id="mGd-hy-ctT">
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="mGd-hy-ctT">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
@@ -12,6 +12,7 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *contentHeight;
@property (weak, nonatomic) IBOutlet UIPlaceHolderTextView *contentTextView;
- (IBAction)imageBtnClick:(id)sender;
@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UILabel *lengthLabel;
@property (nonatomic,strong)UIImage* publishImage;
@@ -8,7 +8,7 @@
#import "NotePublishViewController.h"
#import "NotePublishViewModel.h"
@interface NotePublishViewController ()<UIAlertViewDelegate,UITextViewDelegate>
@interface NotePublishViewController ()<UIAlertViewDelegate,UITextViewDelegate,UIActionSheetDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
{
NSInteger _textLeft;
}
@@ -111,4 +111,56 @@
}
*/
- (IBAction)imageBtnClick:(id)sender {
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
UIActionSheet* actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"拍照",@"从手机相册选择", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheet showFromTabBar:self.tabBarController.tabBar];
}else{
[self actionSheet:nil clickedButtonAtIndex:1];
}
}
#pragma mark UIActonSheetDelegate
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
UIImagePickerController* picker = [[UIImagePickerController alloc] init];
// picker.allowsEditing = YES;
picker.delegate = self;
if (buttonIndex == 0) {
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
}
if (buttonIndex == 1) {
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
if(buttonIndex == 2)
{
return;
}
[self presentViewController:picker animated:YES completion:nil];
}
#pragma mark UIImagePickerControllerDelegate
-(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
[picker dismissViewControllerAnimated: YES completion: ^(void){}];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage* image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
}
// resize image
image = [Ash_UIUtil fixOrientation:image];
image = [Ash_UIUtil compressImageDownToPhoneScreenSize:image];
[picker dismissViewControllerAnimated:NO completion:nil];
_publishImage = image;
[_imageView setImage:_publishImage];
}
@end
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="NotePublishViewController">
@@ -45,18 +45,31 @@
<rect key="frame" x="274" y="8" width="36" height="36"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="36" id="6mz-DH-ZMu"/>
<constraint firstAttribute="height" constant="36" id="klF-JR-XTO"/>
<constraint firstAttribute="width" constant="36" id="ovV-xy-wqj"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="l0m-Hq-zac">
<rect key="frame" x="266" y="0.0" width="46" height="42"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="imageBtnClick:" destination="-1" eventType="touchUpInside" id="uYp-wD-6lq"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="cLV-hQ-H4S" secondAttribute="trailing" constant="10" id="14N-20-VO8"/>
<constraint firstAttribute="height" constant="50" id="L7h-P1-z4e"/>
<constraint firstItem="cLV-hQ-H4S" firstAttribute="top" relation="greaterThanOrEqual" secondItem="qUF-OC-qqu" secondAttribute="top" constant="8" id="Tb3-rX-z33"/>
<constraint firstAttribute="bottom" secondItem="cLV-hQ-H4S" secondAttribute="bottom" constant="6" id="W8m-Fs-P9p"/>
<constraint firstAttribute="bottom" secondItem="zdj-cC-ut8" secondAttribute="bottom" id="abE-oe-o2u"/>
<constraint firstItem="zdj-cC-ut8" firstAttribute="leading" secondItem="qUF-OC-qqu" secondAttribute="leading" constant="8" id="e0C-Dy-0sl"/>
<constraint firstItem="cLV-hQ-H4S" firstAttribute="top" secondItem="qUF-OC-qqu" secondAttribute="top" constant="8" id="mrN-0P-CRx"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="cLV-hQ-H4S" secondAttribute="trailing" constant="10" id="uB6-cb-omM"/>
<constraint firstItem="zdj-cC-ut8" firstAttribute="top" secondItem="qUF-OC-qqu" secondAttribute="top" constant="29" id="uVa-gV-hXj"/>
</constraints>
</view>
@@ -33,7 +33,7 @@
@property (nonatomic, strong)Text_Voice *text_voice;
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(NSInteger)type; //type 0 查看全部,1关注;
+(PropertyEntity*)requireMyWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
+(PropertyEntity*)requireOhterWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withOtherId:(NSString*)otherid;
@@ -62,7 +62,7 @@
+ (NSValueTransformer *)text_voiceJSONTransformer{
return [NSValueTransformer mtl_JSONDictionaryTransformerWithModelClass:Text_Voice.class];
}
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(NSInteger)type
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithPOSTDATA;
@@ -72,8 +72,12 @@
@"pageSize": [NSString stringWithFormat:@"%ld",(long)page_size],
};
NSString* command = @"30004";
if (type == 1) {
command = @"30009";
}
pro.pro = @{@"root": dic,
@"command": @"30004",
@"command": command,
};
return pro;
+1 -1
View File
@@ -30,7 +30,7 @@
@property (nonatomic, strong)NSArray* text_imagesArr;
@property (nonatomic, strong)Text_Image* text_image;
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(NSInteger)type; //type 0 查看全部,1关注
+(PropertyEntity*)requireMyWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size;
+(PropertyEntity*)requireOhterWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withOtherId:(NSString*)otherid;
+6 -3
View File
@@ -64,7 +64,7 @@
return [NSValueTransformer mtl_JSONDictionaryTransformerWithModelClass:Text_Image.class];
}
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size
+(PropertyEntity*)requireWithOrder_by:(Order_by)order_by withPage:(NSInteger)page withPage_size:(NSInteger)page_size withType:(NSInteger)type
{
PropertyEntity *pro = [[PropertyEntity alloc] init];
pro.requireType = HTTPRequestTypeWithPOSTDATA;
@@ -74,9 +74,12 @@
@"page": [NSString stringWithFormat:@"%ld",(long)page],
@"pageSize": [NSString stringWithFormat:@"%ld",(long)page_size],
};
NSString* command = @"20004";
if (type == 1) {
command = @"20009";
}
pro.pro = @{@"root": dic,
@"command": @"20004",
@"command": command,
};
@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface MessageSetTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UISwitch *isSlectSwitch;
@end
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -12,7 +13,19 @@
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="nae-IX-wTZ">
<rect key="frame" x="263" y="6" width="51" height="31"/>
</switch>
</subviews>
<constraints>
<constraint firstAttribute="centerY" secondItem="nae-IX-wTZ" secondAttribute="centerY" id="CVd-Ga-WH8"/>
<constraint firstAttribute="trailing" secondItem="nae-IX-wTZ" secondAttribute="trailing" constant="8" id="GAA-3f-3Sd"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="isSlectSwitch" destination="nae-IX-wTZ" id="w2I-WI-sBE"/>
</connections>
</tableViewCell>
</objects>
</document>
+25
View File
@@ -0,0 +1,25 @@
//
// TypeSelectBgView.h
// Ash_AWord
//
// Created by xmfish on 15/6/28.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TypeSelectBgView : UIView
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UIButton *allBtn;
- (IBAction)allBtnClick:(id)sender;
- (IBAction)bgBtnClick:(id)sender;
- (IBAction)attentionBtnClick:(id)sender;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineHeight;
@property (weak, nonatomic) IBOutlet UIView *lineView;
@property (weak, nonatomic) IBOutlet UIButton *attentionBtn;
@property(nonatomic, assign)NSInteger typeIndex;
-(void)show;
-(void)hide;
@end
+71
View File
@@ -0,0 +1,71 @@
//
// TypeSelectBgView.m
// Ash_AWord
//
// Created by xmfish on 15/6/28.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "TypeSelectBgView.h"
@implementation TypeSelectBgView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
*/
- (void)drawRect:(CGRect)rect {
// Drawing code
_allBtn.tag = 0;
_attentionBtn.tag = 1;
CGRect frame = _bgView.frame;
frame.origin.y-=_bgView.frame.size.height;
_bgView.frame = frame;
_lineHeight.constant = 0.5;
_lineView.backgroundColor = [UIColor lineColor];
}
- (IBAction)allBtnClick:(id)sender {
}
- (IBAction)bgBtnClick:(id)sender {
[self hide];
}
- (IBAction)attentionBtnClick:(id)sender {
}
-(void)show{
[self changeTypeState];
self.hidden = NO;
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = _bgView.frame;
frame.origin.y+=_bgView.frame.size.height;
_bgView.frame = frame;
} completion:^(BOOL finished) {
}];
}
-(void)hide{
[UIView animateWithDuration:0.3 animations:^{
CGRect frame = _bgView.frame;
frame.origin.y-=_bgView.frame.size.height;
_bgView.frame = frame;
} completion:^(BOOL finished) {
self.hidden = YES;
}];
}
-(void)changeTypeState
{
if (_typeIndex == 0) {
[_allBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal];
[_attentionBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
}else{
[_allBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[_attentionBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal];
}
}
@end
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="TypeSelectBgView">
<rect key="frame" x="0.0" y="2" width="272" height="134"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b8C-U8-dGr">
<rect key="frame" x="0.0" y="0.0" width="272" height="90"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="c21-LQ-hB0">
<rect key="frame" x="0.0" y="5" width="272" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="Pju-Cg-FTB"/>
</constraints>
<state key="normal" title="全部">
<color key="titleColor" cocoaTouchSystemColor="darkTextColor"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MSX-ZZ-dGo">
<rect key="frame" x="0.0" y="45" width="272" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="dWu-Za-PZy"/>
</constraints>
<state key="normal" title="关注">
<color key="titleColor" red="0.3803921569" green="0.74901960779999999" blue="0.66274509800000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</state>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qCa-uF-ySP">
<rect key="frame" x="0.0" y="41" width="272" height="1"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="iry-7Q-Fvq"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="qCa-uF-ySP" firstAttribute="leading" secondItem="b8C-U8-dGr" secondAttribute="leading" id="1ou-EF-yf6"/>
<constraint firstAttribute="trailing" secondItem="MSX-ZZ-dGo" secondAttribute="trailing" id="3By-5y-Ca9"/>
<constraint firstItem="MSX-ZZ-dGo" firstAttribute="leading" secondItem="b8C-U8-dGr" secondAttribute="leading" id="BX5-58-HE8"/>
<constraint firstAttribute="trailing" secondItem="qCa-uF-ySP" secondAttribute="trailing" id="DLj-L3-M0Y"/>
<constraint firstAttribute="height" constant="90" id="HHp-kc-KEg"/>
<constraint firstItem="MSX-ZZ-dGo" firstAttribute="top" secondItem="c21-LQ-hB0" secondAttribute="bottom" id="IDn-08-1ao"/>
<constraint firstItem="c21-LQ-hB0" firstAttribute="top" secondItem="b8C-U8-dGr" secondAttribute="top" constant="5" id="RPQ-US-6WM"/>
<constraint firstAttribute="trailing" secondItem="c21-LQ-hB0" secondAttribute="trailing" id="Rnx-Er-brd"/>
<constraint firstItem="qCa-uF-ySP" firstAttribute="top" secondItem="b8C-U8-dGr" secondAttribute="top" constant="41" id="bDd-LN-wui"/>
<constraint firstItem="c21-LQ-hB0" firstAttribute="leading" secondItem="b8C-U8-dGr" secondAttribute="leading" id="zio-mF-4GT"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7yc-Dx-b6C">
<rect key="frame" x="0.0" y="90" width="272" height="44"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="bgBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="Axd-O0-6DN"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.14999999999999999" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="b8C-U8-dGr" secondAttribute="trailing" id="4qZ-Wa-dVz"/>
<constraint firstAttribute="trailing" secondItem="7yc-Dx-b6C" secondAttribute="trailing" id="9c2-P1-rPY"/>
<constraint firstItem="b8C-U8-dGr" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="9ea-FG-kuv"/>
<constraint firstItem="7yc-Dx-b6C" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="KO1-HU-u2v"/>
<constraint firstAttribute="bottom" secondItem="7yc-Dx-b6C" secondAttribute="bottom" id="R5G-dy-uUA"/>
<constraint firstItem="7yc-Dx-b6C" firstAttribute="top" secondItem="b8C-U8-dGr" secondAttribute="bottom" id="U7L-e4-99D"/>
<constraint firstItem="b8C-U8-dGr" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="a0k-tS-hL7"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="allBtn" destination="c21-LQ-hB0" id="bRP-8d-sRB"/>
<outlet property="attentionBtn" destination="MSX-ZZ-dGo" id="w9W-cB-R8I"/>
<outlet property="bgView" destination="b8C-U8-dGr" id="thA-3l-srf"/>
<outlet property="lineHeight" destination="iry-7Q-Fvq" id="DA2-gf-r9j"/>
<outlet property="lineView" destination="qCa-uF-ySP" id="qKo-sn-Ytj"/>
</connections>
<point key="canvasLocation" x="172" y="132"/>
</view>
</objects>
</document>
+16
View File
@@ -0,0 +1,16 @@
//
// TypeSelectView.h
// Ash_AWord
//
// Created by xmfish on 15/6/28.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TypeSelectView : UIView
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIButton *imageTypeBtn;
@property (weak, nonatomic) IBOutlet UIButton *typeBtn;
@end
+23
View File
@@ -0,0 +1,23 @@
//
// TypeSelectView.m
// Ash_AWord
//
// Created by xmfish on 15/6/28.
// Copyright (c) 2015年 ash. All rights reserved.
//
#import "TypeSelectView.h"
@implementation TypeSelectView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
- (IBAction)typeBtnClick:(id)sender {
}
@end
+67
View File
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7702" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="TypeSelectView">
<rect key="frame" x="0.0" y="0.0" width="231" height="65"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="全部" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Usu-3N-m0A">
<rect key="frame" x="94" y="22" width="34" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IvM-uJ-INl">
<rect key="frame" x="130" y="22" width="15" height="22"/>
<state key="normal" image="Profile_filter_down.png">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oIe-2E-sqT">
<rect key="frame" x="94" y="22" width="51" height="30"/>
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="typeBtnClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="1vK-WI-Kr6"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="centerY" secondItem="IvM-uJ-INl" secondAttribute="centerY" id="05s-jX-fzx"/>
<constraint firstItem="Usu-3N-m0A" firstAttribute="top" secondItem="oIe-2E-sqT" secondAttribute="top" id="1KA-b1-s1K"/>
<constraint firstItem="Usu-3N-m0A" firstAttribute="leading" secondItem="oIe-2E-sqT" secondAttribute="leading" id="5Iv-fU-llZ"/>
<constraint firstAttribute="centerX" secondItem="Usu-3N-m0A" secondAttribute="centerX" constant="5" id="F2h-gs-Gge"/>
<constraint firstAttribute="centerY" secondItem="Usu-3N-m0A" secondAttribute="centerY" id="d6u-cg-81R"/>
<constraint firstItem="oIe-2E-sqT" firstAttribute="trailing" secondItem="IvM-uJ-INl" secondAttribute="trailing" id="kIg-11-7xt"/>
<constraint firstAttribute="centerX" secondItem="IvM-uJ-INl" secondAttribute="centerX" id="lIa-Jq-rN1"/>
<constraint firstItem="IvM-uJ-INl" firstAttribute="leading" secondItem="Usu-3N-m0A" secondAttribute="trailing" constant="2" id="mT5-8B-PE5"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<nil key="simulatedTopBarMetrics"/>
<nil key="simulatedBottomBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<variation key="default">
<mask key="constraints">
<exclude reference="lIa-Jq-rN1"/>
</mask>
</variation>
<connections>
<outlet property="imageTypeBtn" destination="IvM-uJ-INl" id="N3Z-lE-JCy"/>
<outlet property="titleLabel" destination="Usu-3N-m0A" id="g6N-3C-JH7"/>
<outlet property="typeBtn" destination="oIe-2E-sqT" id="fAr-z2-Flj"/>
</connections>
<point key="canvasLocation" x="26.5" y="331.5"/>
</view>
</objects>
<resources>
<image name="Profile_filter_down.png" width="15" height="11"/>
</resources>
</document>