-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from Dongshanxu/master
9.2.7
- Loading branch information
Showing
303 changed files
with
27,043 additions
and
25,710 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
NEChatUIKit/NEKitChatUI/Assets/en.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9
NEChatUIKit/NEKitChatUI/Assets/zh-Hans.lproj/Localizable.strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 14 additions & 14 deletions
28
NEChatUIKit/NEKitChatUI/Classes/Base/BaseView/ChatBaseCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
|
||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
import UIKit | ||
|
||
public class ChatBaseCell: UITableViewCell { | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
self.selectionStyle = .none | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
public func uploadProgress(_ progress: Float){ | ||
fatalError("override in sub class") | ||
} | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
selectionStyle = .none | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
public func uploadProgress(_ progress: Float) { | ||
fatalError("override in sub class") | ||
} | ||
} |
9 changes: 4 additions & 5 deletions
9
NEChatUIKit/NEKitChatUI/Classes/Base/BaseView/ChatBaseCollectionViewCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
|
||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
import UIKit | ||
|
||
class ChatBaseCollectionViewCell: UICollectionViewCell { | ||
|
||
} | ||
class ChatBaseCollectionViewCell: UICollectionViewCell {} |
67 changes: 33 additions & 34 deletions
67
NEChatUIKit/NEKitChatUI/Classes/Base/BaseView/ChatCenterTextCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
|
||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
import UIKit | ||
|
||
class ChatCenterTextCell: ChatCornerCell { | ||
public var titleLabel: UILabel = .init() | ||
public var line = UIView() | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
|
||
public var titleLabel: UILabel = UILabel() | ||
public var line = UIView() | ||
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
|
||
self.titleLabel.font = UIFont.systemFont(ofSize: 16) | ||
self.titleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
self.titleLabel.textColor = .ne_redText | ||
self.titleLabel.textAlignment = .center | ||
self.contentView.addSubview(self.titleLabel) | ||
NSLayoutConstraint.activate([ | ||
self.titleLabel.leftAnchor.constraint(equalTo: self.contentView.leftAnchor, constant: 36), | ||
self.titleLabel.rightAnchor.constraint(equalTo: self.contentView.rightAnchor, constant: -36), | ||
self.titleLabel.topAnchor.constraint(equalTo: self.contentView.topAnchor), | ||
self.titleLabel.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor) | ||
]) | ||
self.titleLabel.text = "title" | ||
self.line.backgroundColor = .ne_greyLine | ||
self.line.translatesAutoresizingMaskIntoConstraints = false | ||
self.contentView.addSubview(self.line) | ||
NSLayoutConstraint.activate([ | ||
self.line.leftAnchor.constraint(equalTo: self.contentView.leftAnchor, constant: 20), | ||
self.line.rightAnchor.constraint(equalTo: self.contentView.rightAnchor, constant: -20), | ||
self.line.heightAnchor.constraint(equalToConstant: 1.0), | ||
self.line.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor) | ||
]) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
titleLabel.font = UIFont.systemFont(ofSize: 16) | ||
titleLabel.translatesAutoresizingMaskIntoConstraints = false | ||
titleLabel.textColor = .ne_redText | ||
titleLabel.textAlignment = .center | ||
contentView.addSubview(titleLabel) | ||
NSLayoutConstraint.activate([ | ||
titleLabel.leftAnchor.constraint(equalTo: contentView.leftAnchor, constant: 36), | ||
titleLabel.rightAnchor.constraint(equalTo: contentView.rightAnchor, constant: -36), | ||
titleLabel.topAnchor.constraint(equalTo: contentView.topAnchor), | ||
titleLabel.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), | ||
]) | ||
titleLabel.text = "title" | ||
line.backgroundColor = .ne_greyLine | ||
line.translatesAutoresizingMaskIntoConstraints = false | ||
contentView.addSubview(line) | ||
NSLayoutConstraint.activate([ | ||
line.leftAnchor.constraint(equalTo: contentView.leftAnchor, constant: 20), | ||
line.rightAnchor.constraint(equalTo: contentView.rightAnchor, constant: -20), | ||
line.heightAnchor.constraint(equalToConstant: 1.0), | ||
line.bottomAnchor.constraint(equalTo: contentView.bottomAnchor), | ||
]) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
} |
11 changes: 5 additions & 6 deletions
11
NEChatUIKit/NEKitChatUI/Classes/Base/BaseView/ChatCornerCell.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
|
||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
//this cell has rounding corner style | ||
// this cell has rounding corner style | ||
import UIKit | ||
import NEKitCommonUI | ||
|
||
class ChatCornerCell: CornerCell { | ||
|
||
} | ||
class ChatCornerCell: CornerCell {} |
82 changes: 41 additions & 41 deletions
82
NEChatUIKit/NEKitChatUI/Classes/Base/BaseView/ChatHeaderView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
|
||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be found in the LICENSE file. | ||
// Copyright (c) 2022 NetEase, Inc. All rights reserved. | ||
// Use of this source code is governed by a MIT license that can be | ||
// found in the LICENSE file. | ||
|
||
import UIKit | ||
|
||
public class ChatHeaderView: UIView { | ||
|
||
public lazy var titleLabel: UILabel = { | ||
let label = UILabel() | ||
label.font = DefaultTextFont(12) | ||
label.textColor = .ne_greyText | ||
label.translatesAutoresizingMaskIntoConstraints = false | ||
return label | ||
}() | ||
|
||
/* | ||
// Only override draw() if you perform custom drawing. | ||
// An empty implementation adversely affects performance during animation. | ||
override func draw(_ rect: CGRect) { | ||
// Drawing code | ||
} | ||
*/ | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setupUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
} | ||
|
||
func setupUI(){ | ||
clipsToBounds = false | ||
addSubview(titleLabel) | ||
NSLayoutConstraint.activate([ | ||
titleLabel.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -8), | ||
titleLabel.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 33) | ||
]) | ||
backgroundColor = .clear | ||
} | ||
|
||
public func setTitle(_ name: String){ | ||
titleLabel.text = name.count > 2 ? String(name[name.index(name.endIndex, offsetBy: -2)...]) : name | ||
} | ||
public lazy var titleLabel: UILabel = { | ||
let label = UILabel() | ||
label.font = DefaultTextFont(12) | ||
label.textColor = .ne_greyText | ||
label.translatesAutoresizingMaskIntoConstraints = false | ||
return label | ||
}() | ||
|
||
/* | ||
// Only override draw() if you perform custom drawing. | ||
// An empty implementation adversely affects performance during animation. | ||
override func draw(_ rect: CGRect) { | ||
// Drawing code | ||
} | ||
*/ | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setupUI() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
} | ||
|
||
func setupUI() { | ||
clipsToBounds = false | ||
addSubview(titleLabel) | ||
NSLayoutConstraint.activate([ | ||
titleLabel.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -8), | ||
titleLabel.leftAnchor.constraint(equalTo: leftAnchor, constant: 33), | ||
]) | ||
backgroundColor = .clear | ||
} | ||
|
||
public func setTitle(_ name: String) { | ||
titleLabel.text = name | ||
.count > 2 ? String(name[name.index(name.endIndex, offsetBy: -2)...]) : name | ||
} | ||
} |
Oops, something went wrong.