|
@@ -59,15 +59,6 @@
|
|
|
make.bottom.mas_equalTo(self.scrollView.mas_bottom);
|
|
|
make.height.mas_equalTo(height);
|
|
|
}];
|
|
|
- [self.publishContainView musicContentPubAction:^(PUBLISH_ACTION type) {
|
|
|
- [weakSelf endEditing:YES];
|
|
|
- if (type == PUBLISH_ACTION_PUBLISH) {
|
|
|
- [weakSelf hideAlert];
|
|
|
- }
|
|
|
- if (weakSelf.callback) {
|
|
|
- weakSelf.callback(type);
|
|
|
- }
|
|
|
- }];
|
|
|
}
|
|
|
else {
|
|
|
// container
|
|
@@ -76,18 +67,30 @@
|
|
|
[self.publishContainView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.left.right.top.bottom.mas_equalTo(self.containerView);
|
|
|
}];
|
|
|
- [self.publishContainView musicContentPubAction:^(PUBLISH_ACTION type) {
|
|
|
- [weakSelf endEditing:YES];
|
|
|
- if (type == PUBLISH_ACTION_PUBLISH) {
|
|
|
- [weakSelf hideAlert];
|
|
|
- }
|
|
|
- if (weakSelf.callback) {
|
|
|
- weakSelf.callback(type);
|
|
|
- }
|
|
|
- }];
|
|
|
}
|
|
|
+ [self.publishContainView musicContentPubAction:^(PUBLISH_ACTION type) {
|
|
|
+ [weakSelf endEditing:YES];
|
|
|
+ if (type == PUBLISH_ACTION_PUBLISH) {
|
|
|
+ [weakSelf hideAlert];
|
|
|
+ }
|
|
|
+ if (weakSelf.callback) {
|
|
|
+ weakSelf.callback(type);
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ [self.publishContainView publishEditCallback:^(BOOL isEdit) {
|
|
|
+ [weakSelf changeStatus:isEdit];
|
|
|
+ }];
|
|
|
}
|
|
|
|
|
|
+// 编辑状态下调整scroll 是否支持滚动
|
|
|
+- (void)changeStatus:(BOOL)isEdit {
|
|
|
+ if (isEdit) {
|
|
|
+ self.scrollView.scrollEnabled = NO;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ self.scrollView.scrollEnabled = YES;
|
|
|
+ }
|
|
|
+}
|
|
|
- (void)evaluateMusicName:(NSString *)musicName userName:(NSString *)userName musicImage:(NSString *)musicImage {
|
|
|
self.publishContainView.musicName.text = [NSString returnNoNullStringWithString:musicName];
|
|
|
[self.publishContainView.musicImage sd_setImageWithURL:[NSURL URLWithString:[musicImage getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:@"pub_music_placeholder"]];
|