My Project
NELyric.h
Go to the documentation of this file.
1// Copyright (c) 2022 NetEase, Inc. All rights reserved.
2// Use of this source code is governed by a MIT license that can be
3// found in the LICENSE file.
4
5#import <Foundation/Foundation.h>
6#import "NELyricLine.h"
7
8NS_ASSUME_NONNULL_BEGIN
9
10typedef NS_ENUM(NSUInteger, NELyricType) {
11 NELyricTypeYrc, // yrc格式
12 NELyricTypeQrc, // qrc格式
13 NELyricTypeKas, // kas格式
14};
15
17@interface NELyric : NSObject
18
20@property(nonatomic, copy, readonly) NSString *content;
21
23@property(nonatomic, assign, readonly) NELyricType type;
24
26@property(nonatomic, strong, readonly) NSArray<NELyricLine *> *lineModels;
27
31- (instancetype)initWithContent:(NSString *)content andType:(NELyricType)type;
32
39- (nullable NELyricLine *)lineAtTime:(NSInteger)time;
40
48- (nullable NELyricLine *)lineAtTime:(NSInteger)time isEnd:(BOOL)isEnd;
49
53- (NSArray<NELyricLine *> *)linesAtTime:(NSInteger)time toTime:(NSInteger)endTime;
54
55@end
56
57NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSUInteger, NELyricType)
Definition: NELyric.h:10
歌词数据对象
Definition: NELyric.h:18
NSString * content
解密后的文本
Definition: NELyric.h:20
NELyricType type
歌词类型
Definition: NELyric.h:23
NSArray< NELyricLine * > * lineModels
行model
Definition: NELyric.h:26
逐行歌词数据对象
Definition: NELyricLine.h:12