动态发布动态的一些功能
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#import "XPMonentsAttentionViewController.h"
|
||||
#import "XPMonentsLatestViewController.h"
|
||||
#import "XPMonentsInteractiveViewController.h"
|
||||
#import "XPMonentsPublishViewController.h"
|
||||
|
||||
@interface XPMonentsViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
///标题
|
||||
@@ -35,6 +36,8 @@
|
||||
///滑块
|
||||
@property (nonatomic,strong) JXCategoryTitleView *titleView;
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
||||
///发布的按钮
|
||||
@property (nonatomic,strong) UIButton *publishButton;
|
||||
@end
|
||||
|
||||
@implementation XPMonentsViewController
|
||||
@@ -58,6 +61,7 @@
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.listContainerView];
|
||||
[self.view addSubview:self.publishButton];
|
||||
|
||||
[self.navView addSubview:self.titleView];
|
||||
[self.navView addSubview:self.messageButton];
|
||||
@@ -92,6 +96,12 @@
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.publishButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(45, 45));
|
||||
make.bottom.mas_equalTo(self.view).offset(-kSafeAreaBottomHeight - 30);
|
||||
make.right.mas_equalTo(self.view).offset(-15);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContainerViewDelegate
|
||||
@@ -114,10 +124,6 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark -NIMSystemNotificationManagerDelegate
|
||||
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
|
||||
if (notification.receiverType == NIMSessionTypeP2P) {
|
||||
@@ -141,6 +147,11 @@
|
||||
[self.navigationController pushViewController:messageVC animated:YES];
|
||||
}
|
||||
|
||||
- (void)publishButtonAction:(UIButton *)sender {
|
||||
XPMonentsPublishViewController * publishVC = [[XPMonentsPublishViewController alloc] init];
|
||||
[self.navigationController pushViewController:publishVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (JXCategoryListContainerView *)listContainerView {
|
||||
if (!_listContainerView) {
|
||||
@@ -210,4 +221,14 @@
|
||||
return _dotView;
|
||||
}
|
||||
|
||||
- (UIButton *)publishButton {
|
||||
if (!_publishButton) {
|
||||
_publishButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_publishButton setImage:[UIImage imageNamed:@"monents_publish"] forState:UIControlStateNormal];
|
||||
[_publishButton setImage:[UIImage imageNamed:@"monents_publish"] forState:UIControlStateSelected];
|
||||
[_publishButton addTarget:self action:@selector(publishButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _publishButton;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user