GCMarqueeView is a marquee view templete, you can use it in your project. Now, there is two version both objective-c and Swift.
Xcode 10.2+
- Clone the repo with git clone command.
- Open GCMarqueeViewDemo_Swift.xcodeproj or GCMarqueeViewDemo.xcodeproj with Xcode in core folder and run.
- Here is two version, you can choose the version you need.
- if you need modify it you can custom
GCMarqueeItem.m
andGCMarqueeView.m
file. Swift
func initUI() {
imageV = UIImageView()
imageV!.image = UIImage(named: "flag_icon")
addSubview(imageV!)
titleLabel = UILabel()
titleLabel?.font = UIFont.systemFont(ofSize: titleFont)
titleLabel?.text = model?.title
addSubview(titleLabel!)
let tapGuester = UITapGestureRecognizer(target: self, action: #selector(tap))
addGestureRecognizer(tapGuester)
}
objective-C
- (void)initUI {
_imageV = [UIImageView new];
_imageV.image = [UIImage imageNamed:@"flag_icon"];
[self addSubview:_imageV];
_titleLabel = [UILabel new];
_titleLabel.font = [UIFont systemFontOfSize:titleFont];
_titleLabel.text = _model.title;
[_titleLabel sizeToFit];
[self addSubview:_titleLabel];
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)];
[self addGestureRecognizer:tapGesture];
}
if you have some question, please push issue or emil clearloveway@gmail.com