NetImageYYLabel 还比较局限性,仅限房间公屏使用

This commit is contained in:
zu
2021-11-03 18:31:05 +08:00
committed by fengshuo
parent db851a28f5
commit 2c9d2fcc12
5 changed files with 14 additions and 22 deletions

View File

@@ -9,7 +9,7 @@
/* Begin PBXBuildFile section */
180806D827293794001FD836 /* NSObject+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 180806D727293794001FD836 /* NSObject+MJExtension.m */; };
180806FB2729A354001FD836 /* ThemeColor+Room.m in Sources */ = {isa = PBXBuildFile; fileRef = 180806FA2729A354001FD836 /* ThemeColor+Room.m */; };
1808072D2731598F001FD836 /* NetImageYYLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1808072C2731598F001FD836 /* NetImageYYLabel.m */; };
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1808072C2731598F001FD836 /* XPNetImageYYLabel.m */; };
1808073027315E8E001FD836 /* NetImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1808072F27315E8E001FD836 /* NetImageView.m */; };
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 181D7F1A2726CE2A00B7C059 /* StageView.m */; };
181D7F212727D9DB00B7C059 /* SocialStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 181D7F202727D9DB00B7C059 /* SocialStageView.m */; };
@@ -276,8 +276,8 @@
180806F827298F9B001FD836 /* RoomGuestDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoomGuestDelegate.h; sourceTree = "<group>"; };
180806F92729A354001FD836 /* ThemeColor+Room.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+Room.h"; sourceTree = "<group>"; };
180806FA2729A354001FD836 /* ThemeColor+Room.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+Room.m"; sourceTree = "<group>"; };
1808072B2731598F001FD836 /* NetImageYYLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetImageYYLabel.h; sourceTree = "<group>"; };
1808072C2731598F001FD836 /* NetImageYYLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NetImageYYLabel.m; sourceTree = "<group>"; };
1808072B2731598F001FD836 /* XPNetImageYYLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNetImageYYLabel.h; sourceTree = "<group>"; };
1808072C2731598F001FD836 /* XPNetImageYYLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNetImageYYLabel.m; sourceTree = "<group>"; };
1808072E27315E8E001FD836 /* NetImageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetImageView.h; sourceTree = "<group>"; };
1808072F27315E8E001FD836 /* NetImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NetImageView.m; sourceTree = "<group>"; };
181D7F192726CE2A00B7C059 /* StageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StageView.h; sourceTree = "<group>"; };
@@ -736,15 +736,6 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1808072727314F12001FD836 /* YYLabel */ = {
isa = PBXGroup;
children = (
1808072B2731598F001FD836 /* NetImageYYLabel.h */,
1808072C2731598F001FD836 /* NetImageYYLabel.m */,
);
path = YYLabel;
sourceTree = "<group>";
};
18486210271EA9A5005FC5DC /* RTC */ = {
isa = PBXGroup;
children = (
@@ -1050,7 +1041,6 @@
189DD56C26DF5B5400AB55B1 /* UI */ = {
isa = PBXGroup;
children = (
1808072727314F12001FD836 /* YYLabel */,
E8659640270160F200846EBD /* VagueImageView */,
E8AC720A26F435AF007D6E91 /* UIImageView */,
E81366F926F0D27A0076364C /* UIButton */,
@@ -1382,6 +1372,8 @@
E84B0E3C2727EDD4008818C6 /* View */ = {
isa = PBXGroup;
children = (
1808072B2731598F001FD836 /* XPNetImageYYLabel.h */,
1808072C2731598F001FD836 /* XPNetImageYYLabel.m */,
E84B0E3D2727EDF6008818C6 /* XPRoomMessageTableViewCell.h */,
E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */,
E84B0E402727EE0A008818C6 /* XPRoomMessageHeaderView.h */,
@@ -2237,7 +2229,7 @@
E8EEB90926FC579A007C6EBA /* XPMineUserInfoEditTableViewCell.m in Sources */,
18C17A5D26F338F300C48E11 /* XplanFBFlutterViewContainer.m in Sources */,
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
1808072D2731598F001FD836 /* NetImageYYLabel.m in Sources */,
1808072D2731598F001FD836 /* XPNetImageYYLabel.m in Sources */,
18486213271EA9DA005FC5DC /* RtcManager.m in Sources */,
186A536926FC6F2E00D67B2C /* XCShareView.m in Sources */,
186A534C26FC6ED900D67B2C /* TTAlertView.m in Sources */,

View File

@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
* - 使
* - 使
*/
@interface NetImageYYLabel : YYLabel
@interface XPNetImageYYLabel : YYLabel
@end

View File

@@ -5,10 +5,10 @@
// Created by zu on 2021/11/2.
//
#import "NetImageYYLabel.h"
#import "XPNetImageYYLabel.h"
#import "NetImageView.h"
@implementation NetImageYYLabel
@implementation XPNetImageYYLabel
- (void)setAttributedText:(NSAttributedString *)attributedText {
NSUInteger length = attributedText.length;

View File

@@ -7,7 +7,7 @@
#import <UIKit/UIKit.h>
@class NetImageYYLabel;
@class XPNetImageYYLabel;
NS_ASSUME_NONNULL_BEGIN

View File

@@ -8,7 +8,7 @@
#import "XPRoomMessageTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
#import "NetImageYYLabel.h"
#import "XPNetImageYYLabel.h"
///Tool
#import "XPMacro.h"
#import "ThemeColor+Room.h"
@@ -21,7 +21,7 @@
///
@property (nonatomic,strong) UIImageView *bubbleImageView;
///
@property (nonatomic,strong) NetImageYYLabel *contentLabel;
@property (nonatomic,strong) XPNetImageYYLabel *contentLabel;
@end
@implementation XPRoomMessageTableViewCell
@@ -76,9 +76,9 @@
return _bubbleImageView;
}
- (NetImageYYLabel *)contentLabel {
- (XPNetImageYYLabel *)contentLabel {
if (!_contentLabel) {
_contentLabel = [[NetImageYYLabel alloc] init];
_contentLabel = [[XPNetImageYYLabel alloc] init];
_contentLabel.preferredMaxLayoutWidth = kRoomMessageMaxWidth - 10;
_contentLabel.numberOfLines = 0;
}