Closed darkengine closed 3 years ago
@darkengine Which version ?
@darkengine Which version ?
Version TTGTagCollectionView (2.0.1)
@darkengine I try myself on my Mac mini M1 on a pure new project and it works fine. (2.0.1 version) Maybe you should clean your cocoapods cache and run pod update
completely from the begin.
@darkengine Is this problem solved?
@darkengine Is this problem solved?
Hi @zekunyan and @kinmoLun ,
Thanks for the advice. I start a new Objective-C project (With XCode 12.5) and add "TTGTagCollectionView" using cocoapods. Unfortunately, it shows the same error message. The codes in my ViewControll.m is:
//
// ViewController.m
// StoneTestTags
//
// Created by Stone on 2021/6/11.
//
#import "ViewController.h"
#import <TTGTextTagCollectionView.h>
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// test text tags
// Create TTGTextTagCollectionView view
TTGTextTagCollectionView *tagCollectionView = [[TTGTextTagCollectionView alloc] initWithFrame:CGRectMake(20, 20, 200, 200)];
[self.view addSubview:tagCollectionView];
// Create TTGTextTag object
TTGTextTag *textTag = [TTGTextTag tagWithContent:[TTGTextTagStringContent contentWithText:@"Some text"] style:[TTGTextTagStyle new]];
// Add tag
[tagCollectionView addTag:textTag];
}
@end
Update! I get it works by changing the import file to:
#import <TTGTagCollectionView/TTGTextTagCollectionView.h>
The old import statement works in the previous version.
@darkengine Great work ! Maybe the new version of Cocoapods you used needs strict import rules.
Compile with XCode 12.5, get error message:
/Pods/TTGTagCollectionView/Sources/TextTag/TTGTextTagCollectionView.h:46:1: Duplicate interface definition for class 'TTGTextTagCollectionView'
The duplicate interface definition is happened in "TTGTextTagCollectionView.h:46", so have no idea how to modify this.