国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件

這篇具有很好參考價值的文章主要介紹了iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件

話題標(biāo)簽tag顯示非常常見,如選擇你的興趣,選擇關(guān)注的群,超話,話題等等。

一、效果圖

iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件,移動開發(fā),iphone開發(fā),Objective-c,ios,xcode,macos,標(biāo)簽,TAG

二、實現(xiàn)代碼

由于顯示的是在列表中,這里整體控件是放在UITableViewCell中的。

2.1 標(biāo)簽tag按鈕實現(xiàn)

自定義標(biāo)簽tag按鈕INRmdTopicButton
INRmdTopicButton.h

@interface INRmdTopicButton : UIControl

@property (nonatomic, strong) NSString *topicName;
@property (nonatomic, assign) CGFloat showTopicWidth;

+ (CGFloat)topicWidth:(NSString *)name;

@end

INRmdTopicButton.m

@interface INRmdTopicButton ()

@property (nonatomic, strong) UIImageView *backImageView;       //圖片控件
@property (nonatomic, strong) UIImageView *tbkImageView;       //圖片控件
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation INRmdTopicButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.backImageView];
        [self.backImageView addSubview:self.tbkImageView];
        [self.backImageView addSubview:self.titleLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.backImageView.frame = self.bounds;
    self.tbkImageView.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self.backImageView.frame), CGRectGetHeight(self.backImageView.frame) - kSmallPadding);
    self.titleLabel.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self.backImageView.frame), kTopicNameHeight);
}

- (void)setTopicName:(NSString *)topicName {
    _topicName = (topicName?topicName:@"");
    self.titleLabel.text = _topicName;
    [self setNeedsLayout];
}

+ (CGFloat)topicWidth:(NSString *)name {
    CGSize topicSize = [name sizeWithFont:[UIFont systemFontOfSize:12] forMaxSize:CGSizeMake(MAXFLOAT, kTopicHeight)];
    return topicSize.width + 2*kSmallPadding;
}

#pragma mark - SETTER/GETTER
- (UIImageView *)backImageView {
    if (!_backImageView) {
        _backImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _backImageView.userInteractionEnabled = YES;
        _backImageView.backgroundColor = [UIColor clearColor];
    }
    return _backImageView;
}

- (UIImageView *)tbkImageView {
    if (!_tbkImageView) {
        _tbkImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _tbkImageView.userInteractionEnabled = YES;
        _tbkImageView.backgroundColor = [UIColor clearColor];
        UIImage *image = [UIImage imageNamed:@"bk_topic_r"];
        image = [image stretchableImageWithLeftCapWidth:floorf(image.size.width * 0.5) topCapHeight:floorf(image.size.height * 0.5)];
        _tbkImageView.image = image;
    }
    return _tbkImageView;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _titleLabel.font = [UIFont systemFontOfSize:12];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor colorWithHexString:@"555555"];
        _titleLabel.backgroundColor = [UIColor clearColor];
    }
    return _titleLabel;
}

@end

2.2 顯示排列標(biāo)簽tag

顯示標(biāo)題tag時候,需要排列按鈕

INRmdTopicButton *lastButton = nil;
    for (UIView *subView in self.topicBKImageView.subviews) {
        if ([subView isKindOfClass:[INRmdTopicButton class]]) {
            INRmdTopicButton *button = (INRmdTopicButton *)subView;
            button.hidden = NO;
            if (lastButton) {
                if (CGRectGetMaxX(lastButton.frame) + button.showTopicWidth + kSmallPadding > maxWidth) {
                    button.frame = CGRectMake(0.0, CGRectGetMaxY(lastButton.frame), button.showTopicWidth, kTopicHeight);
                } else {
                    button.frame = CGRectMake(CGRectGetMaxX(lastButton.frame) + kSmallPadding, CGRectGetMinY(lastButton.frame), button.showTopicWidth, kTopicHeight);
                }
            } else {
                button.frame = CGRectMake(originX, originY, button.showTopicWidth, kTopicHeight);
            }
            
            if (CGRectGetMaxY(button.frame) > maxHeight) {
                button.hidden = YES;
            } else {
                button.hidden = NO;
            }
            
            lastButton = button;
        }
    }

這里還加了拖動手勢UIPanGestureRecognizer,當(dāng)往左拖動的時候會顯示松開換一換的功能。調(diào)用接口實現(xiàn)。

#pragma mark - panGestureHandle
- (void)panGestureHandle:(UIPanGestureRecognizer *)pan{
    if (pan.state == UIGestureRecognizerStateBegan) {
        NSLog(@"UIGestureRecognizerStateBegan");
        self.startPoint = [pan translationInView:self];
    } if (pan.state == UIGestureRecognizerStateChanged) {
        NSLog(@"UIGestureRecognizerStateChanged");
        
        CGPoint point = [pan translationInView:self];
        CGFloat xDistance = point.x - self.startPoint.x;
        // 左右滑動
        NSLog(@"左右滑動");
        if (xDistance > 0) {
            NSLog(@"向右滑動");
            CGRect backFrame = self.topicBKImageView.frame;
            backFrame.origin.x = kMidPadding;
            self.topicBKImageView.frame = backFrame;
        } else {
            NSLog(@"向左滑動");
            CGRect backFrame = self.topicBKImageView.frame;
            backFrame.origin.x = kMidPadding + xDistance*0.5;
            self.topicBKImageView.frame = backFrame;
        }
        
    } else {
        // if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateCancelled || pan.state == UIGestureRecognizerStateFailed)
        NSLog(@"UIGestureRecognizerStateEnded");
        CGRect backFrame = self.topicBKImageView.frame;
        backFrame.origin.x = kMidPadding;
        [UIView animateWithDuration:0.55 delay:0.0 usingSpringWithDamping:0.5 initialSpringVelocity:7.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.topicBKImageView.frame = backFrame;
        } completion:^(BOOL finished) {
            
        }];
    }
}

-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}

2.3 完整代碼如下

INRecommentTopicCell.h

#import <UIKit/UIKit.h>

@interface INRmdTopicButton : UIControl

@property (nonatomic, strong) NSString *topicName;
@property (nonatomic, assign) CGFloat showTopicWidth;

+ (CGFloat)topicWidth:(NSString *)name;

@end

/**
 推薦的話題
 */
@interface INRecommentTopicCell : UITableViewCell

+ (CGFloat)cellHeight;

@end

INRecommentTopicCell.m

#import "INRecommentTopicCell.h"
#import "UIColor+Addition.h"
#import "NSString+Size.h"

static CGFloat kCellHeight = 260.0;

static CGFloat kCellHorBGPadding = 10.0f;
static CGFloat kCellVerBGPadding = 5.0f;

static CGFloat kTitleHeight = 44.0f;
static CGFloat kMidPadding = 10.0f;

static CGFloat kSmallPadding = 5.0f;
static CGFloat kTopicHeight = 40.0f;
static CGFloat kTopicNameHeight = 30.0f;

static CGFloat kExchangeBtnSize = 40.0f;
static CGFloat kTisWidth = 20.0f;

@interface INRmdTopicButton ()

@property (nonatomic, strong) UIImageView *backImageView;       //圖片控件
@property (nonatomic, strong) UIImageView *tbkImageView;       //圖片控件
@property (nonatomic, strong) UILabel *titleLabel;

@end

@implementation INRmdTopicButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.backImageView];
        [self.backImageView addSubview:self.tbkImageView];
        [self.backImageView addSubview:self.titleLabel];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.backImageView.frame = self.bounds;
    self.tbkImageView.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self.backImageView.frame), CGRectGetHeight(self.backImageView.frame) - kSmallPadding);
    self.titleLabel.frame = CGRectMake(0.0, 0.0, CGRectGetWidth(self.backImageView.frame), kTopicNameHeight);
}

- (void)setTopicName:(NSString *)topicName {
    _topicName = (topicName?topicName:@"");
    self.titleLabel.text = _topicName;
    [self setNeedsLayout];
}

+ (CGFloat)topicWidth:(NSString *)name {
    CGSize topicSize = [name sizeWithFont:[UIFont systemFontOfSize:12] forMaxSize:CGSizeMake(MAXFLOAT, kTopicHeight)];
    return topicSize.width + 2*kSmallPadding;
}

#pragma mark - SETTER/GETTER
- (UIImageView *)backImageView {
    if (!_backImageView) {
        _backImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _backImageView.userInteractionEnabled = YES;
        _backImageView.backgroundColor = [UIColor clearColor];
    }
    return _backImageView;
}

- (UIImageView *)tbkImageView {
    if (!_tbkImageView) {
        _tbkImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _tbkImageView.userInteractionEnabled = YES;
        _tbkImageView.backgroundColor = [UIColor clearColor];
        UIImage *image = [UIImage imageNamed:@"bk_topic_r"];
        image = [image stretchableImageWithLeftCapWidth:floorf(image.size.width * 0.5) topCapHeight:floorf(image.size.height * 0.5)];
        _tbkImageView.image = image;
    }
    return _tbkImageView;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _titleLabel.font = [UIFont systemFontOfSize:12];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.textColor = [UIColor colorWithHexString:@"555555"];
        _titleLabel.backgroundColor = [UIColor clearColor];
    }
    return _titleLabel;
}

@end

/**
 推薦的話題
 */
@interface INRecommentTopicCell ()

@property (nonatomic, strong) UIImageView *backImageView;       //圖片控件
@property (nonatomic, strong) UIImageView *contentBGImageView;       //圖片控件
@property (nonatomic, strong) UIImageView *topicBKImageView;       //圖片控件
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *exchangeButton;     // 更多

@property (nonatomic, strong) UILabel *tipsLabel;

@property (nonatomic) CGPoint startPoint;     // 開始點

@end

@implementation INRecommentTopicCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        self.backgroundColor = [UIColor clearColor];
        self.contentView.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:self.backImageView];
        [self.contentView addSubview:self.contentBGImageView];
        [self.contentBGImageView addSubview:self.titleLabel];
        [self.contentBGImageView addSubview:self.exchangeButton];
        [self.contentBGImageView addSubview:self.tipsLabel];
        [self.contentBGImageView addSubview:self.topicBKImageView];

        [self setupRmdTopicViews];
        
        UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(panGestureHandle:)];
        panGesture.minimumNumberOfTouches = 1;
        panGesture.maximumNumberOfTouches = 1;
        panGesture.delegate = self;
        [self.contentBGImageView addGestureRecognizer:panGesture];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    self.backImageView.frame = CGRectMake(kCellHorBGPadding, kCellVerBGPadding, CGRectGetWidth(self.bounds) - 2*kCellHorBGPadding, CGRectGetHeight(self.bounds) - 2*kCellVerBGPadding);
    
    self.contentBGImageView.frame = CGRectMake(kCellHorBGPadding, kCellVerBGPadding, CGRectGetWidth(self.bounds) - 2*kCellHorBGPadding, CGRectGetHeight(self.bounds) - 2*kCellVerBGPadding);

    self.titleLabel.frame = CGRectMake(kMidPadding, 0.0, CGRectGetWidth(self.backImageView.frame) - 3*kMidPadding - kExchangeBtnSize, kTitleHeight);
    
    self.exchangeButton.frame = CGRectMake(CGRectGetWidth(self.backImageView.frame) - kMidPadding - kExchangeBtnSize, (kTitleHeight - kExchangeBtnSize)/2, kExchangeBtnSize, kExchangeBtnSize);
    
    CGFloat height = CGRectGetHeight(self.backImageView.frame) - CGRectGetMaxY(self.titleLabel.frame);
    self.tipsLabel.frame = CGRectMake(CGRectGetWidth(self.backImageView.frame) - kMidPadding - kTisWidth, 0.0, kTisWidth, height);
    
    self.topicBKImageView.frame = CGRectMake(kMidPadding, CGRectGetMaxY(self.titleLabel.frame), CGRectGetWidth(self.backImageView.frame) - 2*kMidPadding, height);
    
    CGFloat maxWidth = CGRectGetWidth(self.topicBKImageView.frame);
    CGFloat maxHeight = CGRectGetHeight(self.topicBKImageView.frame);
    
    CGFloat originX = 0.0;
    CGFloat originY = 0.0;

    INRmdTopicButton *lastButton = nil;
    for (UIView *subView in self.topicBKImageView.subviews) {
        if ([subView isKindOfClass:[INRmdTopicButton class]]) {
            INRmdTopicButton *button = (INRmdTopicButton *)subView;
            button.hidden = NO;
            if (lastButton) {
                if (CGRectGetMaxX(lastButton.frame) + button.showTopicWidth + kSmallPadding > maxWidth) {
                    button.frame = CGRectMake(0.0, CGRectGetMaxY(lastButton.frame), button.showTopicWidth, kTopicHeight);
                } else {
                    button.frame = CGRectMake(CGRectGetMaxX(lastButton.frame) + kSmallPadding, CGRectGetMinY(lastButton.frame), button.showTopicWidth, kTopicHeight);
                }
            } else {
                button.frame = CGRectMake(originX, originY, button.showTopicWidth, kTopicHeight);
            }
            
            if (CGRectGetMaxY(button.frame) > maxHeight) {
                button.hidden = YES;
            } else {
                button.hidden = NO;
            }
            
            lastButton = button;
        }
    }
}

- (void)setupRmdTopicViews {
    for (UIView *subView in self.topicBKImageView.subviews) {
        if ([subView isKindOfClass:[INRmdTopicButton class]]) {
            [subView removeFromSuperview];
        }
    }
    
    for (NSInteger index = 0; index < 15; index ++) {
        INRmdTopicButton *button = [[INRmdTopicButton alloc] initWithFrame:CGRectZero];
        button.tag = index;
        [self.topicBKImageView addSubview:button];
        
        if (index % 5 == 0) {
            button.topicName = @"#讀書交流";
        } else if (index % 5 == 1) {
            button.topicName = @"#愛手工生活";
        } else if (index % 5 == 2) {
            button.topicName = @"#精致的佛系生活";
        } else if (index % 5 == 3) {
            button.topicName = @"#數(shù)碼發(fā)燒友";
        } else if (index % 5 == 4) {
            button.topicName = @"#曬曬你的心情";
        } else {
            button.topicName = @"#說說身邊事";
        }
        button.showTopicWidth = [INRmdTopicButton topicWidth:button.topicName];
    }
    
    [self setNeedsLayout];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (CGFloat)cellHeight {
    return kCellHeight;
}

#pragma mark - Actions
- (void)exchangeButtonAction {
    
}

#pragma mark - SETTER/GETTER
- (UIImageView *)backImageView {
    if (!_backImageView) {
        _backImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _backImageView.userInteractionEnabled = YES;
        _backImageView.backgroundColor = [UIColor whiteColor];
        _backImageView.layer.cornerRadius = 2.0;
        _backImageView.layer.shadowColor = [UIColor colorWithHexString:@"9bb9ef"].CGColor;
        _backImageView.layer.shadowOffset = CGSizeMake(0, 3);
        _backImageView.layer.shadowOpacity = 0.3;
        _backImageView.layer.shadowRadius = 3.0;
    }
    return _backImageView;
}

- (UIImageView *)contentBGImageView {
    if (!_contentBGImageView) {
        _contentBGImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _contentBGImageView.userInteractionEnabled = YES;
        _contentBGImageView.backgroundColor = [UIColor whiteColor];
        _contentBGImageView.layer.cornerRadius = 2.0;
        _contentBGImageView.layer.masksToBounds = YES;
        _contentBGImageView.clipsToBounds = YES;
    }
    return _contentBGImageView;
}

- (UIImageView *)topicBKImageView {
    if (!_topicBKImageView) {
        _topicBKImageView = [[UIImageView alloc] initWithFrame:CGRectZero];
        _topicBKImageView.userInteractionEnabled = YES;
        _topicBKImageView.backgroundColor = [UIColor whiteColor];
        _topicBKImageView.clipsToBounds = YES;
    }
    return _topicBKImageView;
}

- (UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _titleLabel.font = [UIFont systemFontOfSize:18];
        _titleLabel.textColor = [UIColor colorWithHexString:@"131619"];
        _titleLabel.backgroundColor = [UIColor clearColor];
        _titleLabel.text = @"熱門話題";
    }
    return _titleLabel;
}

- (UILabel *)tipsLabel {
    if (!_tipsLabel) {
        _tipsLabel = [[UILabel alloc] initWithFrame:CGRectZero];
        _tipsLabel.font = [UIFont systemFontOfSize:12];
        _tipsLabel.textColor = [UIColor colorWithHexString:@"9a9b9c"];
        _tipsLabel.backgroundColor = [UIColor clearColor];
        _tipsLabel.numberOfLines = 0;
        _tipsLabel.textAlignment = NSTextAlignmentCenter;
        _tipsLabel.text = @"松\n開\n換\n一\n換";
    }
    return _tipsLabel;
}

- (UIButton *)exchangeButton {
    if (!_exchangeButton) {
        _exchangeButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_exchangeButton setImage:[UIImage imageNamed:@"ic_topic_exchange"] forState:UIControlStateNormal];
        [_exchangeButton addTarget:self action:@selector(exchangeButtonAction) forControlEvents:UIControlEventTouchUpInside];
    }
    return _exchangeButton;
}

#pragma mark - panGestureHandle
- (void)panGestureHandle:(UIPanGestureRecognizer *)pan{
    if (pan.state == UIGestureRecognizerStateBegan) {
        NSLog(@"UIGestureRecognizerStateBegan");
        self.startPoint = [pan translationInView:self];
    } if (pan.state == UIGestureRecognizerStateChanged) {
        NSLog(@"UIGestureRecognizerStateChanged");
        
        CGPoint point = [pan translationInView:self];
        CGFloat xDistance = point.x - self.startPoint.x;
        // 左右滑動
        NSLog(@"左右滑動");
        if (xDistance > 0) {
            NSLog(@"向右滑動");
            CGRect backFrame = self.topicBKImageView.frame;
            backFrame.origin.x = kMidPadding;
            self.topicBKImageView.frame = backFrame;
        } else {
            NSLog(@"向左滑動");
            CGRect backFrame = self.topicBKImageView.frame;
            backFrame.origin.x = kMidPadding + xDistance*0.5;
            self.topicBKImageView.frame = backFrame;
        }
        
    } else {
        // if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateCancelled || pan.state == UIGestureRecognizerStateFailed)
        NSLog(@"UIGestureRecognizerStateEnded");
        CGRect backFrame = self.topicBKImageView.frame;
        backFrame.origin.x = kMidPadding;
        [UIView animateWithDuration:0.55 delay:0.0 usingSpringWithDamping:0.5 initialSpringVelocity:7.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
            self.topicBKImageView.frame = backFrame;
        } completion:^(BOOL finished) {
            
        }];
    }
}

-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    return YES;
}

@end

三、小結(jié)

iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件
話題標(biāo)簽tag顯示非常常見,如選擇你的興趣,選擇關(guān)注的群,超話,話題等等。

學(xué)習(xí)記錄,每天不停進(jìn)步。文章來源地址http://www.zghlxwxcb.cn/news/detail-620878.html

到了這里,關(guān)于iOS開發(fā)-實現(xiàn)熱門話題標(biāo)簽tag顯示控件的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • 【熱門話題】計算機視覺入門:探索數(shù)字世界中的“視覺智能”

    【熱門話題】計算機視覺入門:探索數(shù)字世界中的“視覺智能”

    ??個人主頁: 鑫寶Code ??熱門專欄: 閑話雜談| 炫酷HTML | JavaScript基礎(chǔ) ? ??個人格言: \\\"如無必要,勿增實體\\\" 計算機視覺(Computer Vision, CV)作為人工智能領(lǐng)域的核心分支之一,致力于賦予機器“看”的能力,使其能從圖像和視頻中提取、分析和理解有用信息。本文旨在為初

    2024年04月12日
    瀏覽(31)
  • Apsara Clouder大數(shù)據(jù)專項技能認(rèn)證:基于MaxCompute的熱門話題分析

    Apsara Clouder大數(shù)據(jù)專項技能認(rèn)證:基于MaxCompute的熱門話題分析

    最花費時間的數(shù)據(jù)預(yù)處理環(huán)節(jié) 數(shù)據(jù)挖掘會大量應(yīng)用人工智能工具。 如決策樹:細(xì)分問題。聚類、回歸分析等。 數(shù)據(jù)分析更側(cè)重數(shù)據(jù)展示。將趨勢或一些其他內(nèi)容呈現(xiàn)出來。 數(shù)據(jù)可視化就是將結(jié)果美觀的展示出來,需要吸引眼球。(感覺說的是美工或者原型制作那種) 數(shù)據(jù)

    2024年02月07日
    瀏覽(26)
  • 【熱門話題】Yarn:新一代JavaScript包管理器的安裝與使用

    【熱門話題】Yarn:新一代JavaScript包管理器的安裝與使用

    ??個人主頁: 鑫寶Code ??熱門專欄: 閑話雜談| 炫酷HTML | JavaScript基礎(chǔ) ? ??個人格言: \\\"如無必要,勿增實體\\\" Yarn是Facebook、Google、Expo和Tilde等公司聯(lián)合開發(fā)的一款高效、可靠的JavaScript包管理工具,它是npm(Node Package Manager)的一個有力替代品。Yarn通過引入鎖定文件、離線模

    2024年04月16日
    瀏覽(24)
  • iOS開發(fā)-CoreNFC實現(xiàn)NFC標(biāo)簽Tag讀取功能

    iOS開發(fā)-CoreNFC實現(xiàn)NFC標(biāo)簽Tag讀取功能

    iOS開發(fā)-CoreNFC實現(xiàn)NFC標(biāo)簽Tag讀取功能 近場通信(NFC)是一種無線通信技術(shù),它使設(shè)備能夠在不使用互聯(lián)網(wǎng)的情況下相互通信。它首先識別附近配備NFC的設(shè)備。NFC常用于智能手機和平板電腦。 在iOS中提供了CoreNFC來實現(xiàn)NFC標(biāo)簽Tag讀取功能。主要使用的類是NFCTagReaderSession。 NFCTa

    2024年02月07日
    瀏覽(27)
  • dedecms織夢TAG標(biāo)簽顯示單個標(biāo)簽共有多少篇文章的方法

    我們在進(jìn)行織夢dedecms模板設(shè)計的時候,想實現(xiàn)tag的鏈接和tag名的同時,還能顯示每個tag關(guān)聯(lián)的文章的數(shù)量。 但是織夢默認(rèn)沒有這樣的標(biāo)簽來調(diào)用,這就需要我們自己對系統(tǒng)文件進(jìn)行修改來實現(xiàn)了,具體方法如下: 找到并打開/include/taglib/tag.lib.php這個文件,找到第87行左右的

    2024年02月02日
    瀏覽(21)
  • 如何將表格中的狀態(tài)數(shù)據(jù)轉(zhuǎn)換為Tag標(biāo)簽顯示

    如何將表格中的狀態(tài)數(shù)據(jù)轉(zhuǎn)換為Tag標(biāo)簽顯示

    考慮到系統(tǒng)前端頁面的美觀程度,通常通過Tag標(biāo)簽來代替某條數(shù)據(jù)中的狀態(tài)信息。僅通過一點操作,便能夠使得頁面美觀程度得到較大提升,前后對比如下所示。代碼基于Vue以及Element-ui組件實現(xiàn)。 修改前: 修改后: 修改前的原始代碼如下所示: 修改后的代碼如下所示:

    2024年02月14日
    瀏覽(16)
  • element-plus的el-tag標(biāo)簽關(guān)閉標(biāo)簽時的高亮顯示邏輯

    element-plus的el-tag標(biāo)簽關(guān)閉標(biāo)簽時的高亮顯示邏輯

    首頁的tag一開始就會存在,而且是不能進(jìn)行刪除的 當(dāng)點擊左側(cè)欄的時候,如果tag沒有該菜單名稱則新增,如果已經(jīng)有了那么當(dāng)前tag背景為藍(lán)色。 刪除當(dāng)前tag,如果是最后一個,那么路由調(diào)整到它前面那個標(biāo)簽并且背景變藍(lán),如果不是最后一個那么路由調(diào)整到它后面那個標(biāo)簽并

    2024年02月06日
    瀏覽(33)
  • dedecms如何實現(xiàn)tag標(biāo)簽偽靜態(tài)的方法

    dedecms的tag標(biāo)簽是一個很好管理的功能,通過tag標(biāo)簽可以找到相關(guān)的內(nèi)容。但是dedecms的tag標(biāo)簽系統(tǒng)默認(rèn)是//www.yii666.net/tags.php?/tag標(biāo)簽/如下圖。不利于SEO優(yōu)化。那么如何將TAGS靜態(tài)化呢?(即改成//www.yii666.net/tags/1.html)。 這里主要是通過修改調(diào)用的標(biāo)簽進(jìn)行偽靜態(tài)。

    2024年02月02日
    瀏覽(33)
  • 帝國CMS首頁通過loop標(biāo)簽調(diào)用TAGS的實現(xiàn)代碼

    帝國CMS首頁無法調(diào)用TAGS,但是本人整理了一段可以使用的代碼分享給大家。 \\\' target=\\\'_blank\\\' rel=\\\'nofollow\\\'\\\' alt=\\\'=$bqr[\\\'title\\\']?\\\' / =$bqr[\\\'smalltext\\\']?...\\\' title=\\\'更多\\\' target=\\\'_blank\\\'[更多] =date(\\\'Y-m-d\\\',$bqr[newstime])? 類目:=$bqsr[classname]? :=$alltag? ?php }else{? =$bqr[\\\'smalltext\\\']?...\\\' title=\\\'更多\\\' targe

    2024年02月03日
    瀏覽(220)
  • DedeCMS系統(tǒng)TAG標(biāo)簽和分頁偽靜態(tài)設(shè)置教程的實現(xiàn)

    現(xiàn)在好多CMS系統(tǒng)都有TAGS標(biāo)簽這項功能,知名的DEDECMS也有,但是它的標(biāo)簽功能很差,不利于seo優(yōu)化,同時也有很多問題,比如:當(dāng)前頁不存在上一頁時,鏈接為“-1”的問題,還有出現(xiàn)“系統(tǒng)無此標(biāo)簽,可能已經(jīng)移除”的問題。 今天小編就教大家把標(biāo)簽偽靜態(tài)(部分資料來源

    2024年02月02日
    瀏覽(23)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包