Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QianDaoBannerViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "LXAdScrollView.h"
|
||||
|
||||
@interface QianDaoBannerViewCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet LXAdScrollView *adView;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// QianDaoBannerViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoBannerViewCell.h"
|
||||
|
||||
@implementation QianDaoBannerViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
-(void)layoutSubviews{
|
||||
[super layoutSubviews];
|
||||
|
||||
NSLog(@"self.adView.scrollView.contentOffset***:%f",self.adView.scrollView.contentOffset.x);
|
||||
|
||||
}
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="QianDaoBannerViewCell" rowHeight="179" id="KGk-i7-Jjw" customClass="QianDaoBannerViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="179"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="178.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mnB-MQ-D9z" customClass="LXAdScrollView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="179"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="mnB-MQ-D9z" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Qsp-pP-67w"/>
|
||||
<constraint firstItem="mnB-MQ-D9z" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Sy9-WG-lb8"/>
|
||||
<constraint firstAttribute="bottom" secondItem="mnB-MQ-D9z" secondAttribute="bottom" id="u9M-MF-Xsy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="mnB-MQ-D9z" secondAttribute="trailing" id="we6-EZ-u2l"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="adView" destination="mnB-MQ-D9z" id="apX-wA-Zfs"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="24.5" y="51.5"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// QianDaoGiftView.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/7.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
//连续签到礼物
|
||||
//typedef void(^GetGiftActionBlock)(NSString *addGoldValue);
|
||||
@interface QianDaoGiftView : UIView
|
||||
//@property (nonatomic,copy) GetGiftActionBlock getGiftBlock;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// QianDaoGiftView.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/7.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoGiftView.h"
|
||||
#import "IfishUserObsever.h"
|
||||
@interface QianDaoGiftView()
|
||||
@property (nonatomic,strong) UIImageView *giftView;
|
||||
@property (nonatomic,strong) UIButton *giftBtn;
|
||||
@property (nonatomic,strong) UILabel *addGoldlabel;
|
||||
@property (nonatomic,strong) UILabel *firstLabe;
|
||||
@property (nonatomic) NSInteger goldValue;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QianDaoGiftView
|
||||
|
||||
-(id)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self creatGiftImg];
|
||||
UIView *holdView =[[UIView alloc] initWithFrame:frame];
|
||||
holdView.backgroundColor = [UIColor blackColor];
|
||||
holdView.alpha = 0.3;
|
||||
[self addSubview:holdView];
|
||||
[self bringSubviewToFront:self.giftBtn];
|
||||
[self insertSubview:self.giftView belowSubview:self.giftBtn];
|
||||
[self insertSubview:holdView belowSubview:self.giftView];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)creatGiftImg{
|
||||
|
||||
self.giftView = [[UIImageView alloc] init ];
|
||||
self.giftView.userInteractionEnabled = YES;
|
||||
[self addSubview:self.giftView];
|
||||
self.giftView.image = [UIImage imageNamed:@"signin_popup_egg"];
|
||||
|
||||
self.firstLabe = [[UILabel alloc] init];
|
||||
self.firstLabe.textColor = [UIColor whiteColor];
|
||||
self.firstLabe.text = @"恭喜您!";
|
||||
self.firstLabe.textAlignment = NSTextAlignmentCenter;
|
||||
self.firstLabe.font =[UIFont systemFontOfSize:13];
|
||||
self.firstLabe.hidden = YES;
|
||||
[self.giftView addSubview:self.firstLabe];
|
||||
_goldValue = 0;
|
||||
self.addGoldlabel = [[UILabel alloc] init];
|
||||
self.addGoldlabel.textColor = [UIColor whiteColor];
|
||||
self.addGoldlabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.addGoldlabel.attributedText = [self getAddGloldText:_goldValue];
|
||||
self.addGoldlabel.hidden = YES;
|
||||
[self.giftView addSubview:self.addGoldlabel];
|
||||
|
||||
|
||||
self.giftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[self addSubview:self.giftBtn];
|
||||
[self.giftBtn setBackgroundImage:[UIImage imageNamed:@"signin_popup_egg_button"] forState:UIControlStateNormal];
|
||||
[self.giftBtn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
self.giftBtn.selected = NO;
|
||||
|
||||
[UIView animateWithDuration:0.36 delay:0 usingSpringWithDamping:25 initialSpringVelocity:20 options:UIViewAnimationOptionCurveEaseIn animations:^{
|
||||
CGFloat imgW = self.frame.size.width - 53*2*KWidth_Scale;
|
||||
self.giftView.frame = CGRectMake(0, 0, imgW, imgW * 1.04);
|
||||
self.giftView.center = self.center;
|
||||
self.firstLabe.frame = CGRectMake(0, 30*KWidth_Scale, imgW, 13);
|
||||
self.addGoldlabel.frame = CGRectMake(0,CGRectGetMaxY(self.firstLabe.frame) +8*KWidth_Scale, imgW, 18);
|
||||
|
||||
CGFloat btnH = (imgW -51*2) * 0.21;
|
||||
self.giftBtn.frame = CGRectMake(CGRectGetMinX(self.giftView.frame) + 51,CGRectGetMaxY(self.giftView.frame) - 19 - btnH,imgW -51*2, btnH);
|
||||
|
||||
|
||||
} completion:^(BOOL finished){
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(NSMutableAttributedString*)getAddGloldText:(NSInteger)goldValue{
|
||||
NSString *gold =[NSString stringWithFormat:@"[%ld个金币]",(long)goldValue];
|
||||
NSString * goldAllStr = [NSString stringWithFormat:@"获得了%@",gold];
|
||||
NSRange range = [goldAllStr rangeOfString:gold];
|
||||
NSMutableAttributedString* string = [[NSMutableAttributedString alloc] initWithString:goldAllStr];
|
||||
[string addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:255.0/255.0 green:218.0/255.0 blue:128.0/255.0 alpha:1] range:range];
|
||||
[string addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:255.0/255.0 green:147.0/255.0 blue:81.0/255.0 alpha:1] range:NSMakeRange(3, 1)];
|
||||
[string addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:255.0/255.0 green:147.0/255.0 blue:81.0/255.0 alpha:1] range:NSMakeRange(goldAllStr.length -1,1)];
|
||||
|
||||
[string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0, 3)];
|
||||
[string addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:18] range:range];
|
||||
return string;
|
||||
|
||||
}
|
||||
|
||||
-(void)btnAction:(UIButton *)btn{
|
||||
|
||||
|
||||
if (btn.selected) {
|
||||
|
||||
[self removeFromSuperview];
|
||||
|
||||
}else{
|
||||
[self hitGoldEgg:btn];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)hitGoldEgg:(UIButton*)btn{
|
||||
|
||||
// self.giftView.image = [UIImage imageNamed:@"signin_popup_obtain"];
|
||||
// [self.giftBtn setBackgroundImage:[UIImage imageNamed:@"signin_popup_obtain_button"] forState:UIControlStateNormal];
|
||||
// self.firstLabe.hidden = NO;
|
||||
// self.addGoldlabel.hidden = NO;
|
||||
// return;
|
||||
|
||||
NSString *userId =[dataContorl dataControlGetUserIdInfo];
|
||||
__weak typeof (self) weakself = self;
|
||||
|
||||
[AFHttpTool ifishHitGoldenEgg:userId success:^(id response) {
|
||||
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
|
||||
|
||||
if ([reDic[@"result"] isEqualToString:@"100"]){
|
||||
NSDictionary *data=reDic[@"data"];
|
||||
if (![data isKindOfClass:[NSNull class]]&&data) {
|
||||
|
||||
IfishUserAsset *userAsset = [[IfishUserAsset alloc] initWithDict:data];
|
||||
[dataContorl resetUserAsset:userAsset];
|
||||
//加金币
|
||||
//if (weakself.getGiftBlock) {
|
||||
// weakself.getGiftBlock(addGoldValue);
|
||||
//}
|
||||
|
||||
weakself.giftView.image = [UIImage imageNamed:@"signin_popup_obtain"];
|
||||
[weakself.giftBtn setBackgroundImage:[UIImage imageNamed:@"signin_popup_obtain_button"] forState:UIControlStateNormal];
|
||||
weakself.giftBtn.selected = YES;
|
||||
weakself.firstLabe.hidden = NO;
|
||||
weakself.addGoldlabel.hidden = NO;
|
||||
_goldValue =userAsset.addValue;
|
||||
weakself.addGoldlabel.attributedText = [self getAddGloldText:_goldValue];
|
||||
//加金币 tost
|
||||
NSString *addvalue = [NSString stringWithFormat:@"%ld",(long)userAsset.addValue];
|
||||
[[IfishUserObsever sharedInstance] showAddGoldWith:addvalue];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSError *err) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QianDaoGongLueViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface QianDaoGongLueViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *firstLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *secondLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *thirdlabel;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// QianDaoGongLueViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoGongLueViewCell.h"
|
||||
|
||||
@implementation QianDaoGongLueViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
NSMutableAttributedString * firstString = [[NSMutableAttributedString alloc] initWithString:@"首次签到+1金币,连续签到每天递增+1,7天后回到1,第7天可额外获得一个神秘礼物。"];
|
||||
|
||||
NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraphStyle setLineSpacing:8];
|
||||
[firstString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [firstString length])];
|
||||
[firstString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(17, 2)];
|
||||
[firstString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:156.0/255.0 blue:1.0/255.0 alpha:1] range:NSMakeRange(37, 4)];
|
||||
self.firstLabel.attributedText = firstString;
|
||||
|
||||
NSMutableAttributedString * secString = [[NSMutableAttributedString alloc] initWithString:@"*金币兑换比例:100金币≈1人民币"];
|
||||
[secString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(0, 1)];
|
||||
[secString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(8, 3)];
|
||||
self.secondLabel.attributedText = secString;
|
||||
|
||||
NSMutableAttributedString * thirdString = [[NSMutableAttributedString alloc] initWithString:@"*一切解释权归©爱鱼奇所有"];
|
||||
[thirdString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:NSMakeRange(0, 1)];
|
||||
self.thirdlabel.attributedText = thirdString;
|
||||
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="QianDaoGongLueViewCell" id="KGk-i7-Jjw" customClass="QianDaoGongLueViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="108"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="108"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="873-oS-3w5">
|
||||
<rect key="frame" x="15" y="5" width="344" height="103"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="fwsfff从 v 第三次 v 是 v 才是 v" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hWC-XB-oLE">
|
||||
<rect key="frame" x="21" y="54" width="301" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="d4S-BY-AoX"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="擦啊擦擦擦" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2OW-Hn-sOQ">
|
||||
<rect key="frame" x="21" y="74" width="301" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="bNL-Lm-Fgx"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rSM-l0-O1T">
|
||||
<rect key="frame" x="21" y="16" width="301" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="32" id="PcM-SD-CTs"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="十二届全国人大五次会议开幕会:国务院总理李克强作政府工作报告">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="12" name=".PingFangSC-Regular"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="8" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96470588235294119" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="rSM-l0-O1T" firstAttribute="top" secondItem="873-oS-3w5" secondAttribute="top" constant="16" id="9wV-Pv-jkU"/>
|
||||
<constraint firstItem="2OW-Hn-sOQ" firstAttribute="leading" secondItem="873-oS-3w5" secondAttribute="leading" constant="21" id="DqS-zv-31y"/>
|
||||
<constraint firstItem="hWC-XB-oLE" firstAttribute="leading" secondItem="873-oS-3w5" secondAttribute="leading" constant="21" id="O1B-tL-SEb"/>
|
||||
<constraint firstItem="2OW-Hn-sOQ" firstAttribute="top" secondItem="hWC-XB-oLE" secondAttribute="bottom" constant="5" id="UHJ-lY-KaX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rSM-l0-O1T" secondAttribute="trailing" constant="22" id="cuY-Kg-pVz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hWC-XB-oLE" secondAttribute="trailing" constant="22" id="qba-b7-E64"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2OW-Hn-sOQ" secondAttribute="trailing" constant="22" id="usA-pp-Tgv"/>
|
||||
<constraint firstItem="rSM-l0-O1T" firstAttribute="leading" secondItem="873-oS-3w5" secondAttribute="leading" constant="21" id="vOh-Df-dR6"/>
|
||||
<constraint firstItem="hWC-XB-oLE" firstAttribute="top" secondItem="rSM-l0-O1T" secondAttribute="bottom" constant="6" id="w74-7h-UVR"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="873-oS-3w5" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="topMargin" constant="-3" id="40Y-wn-vat"/>
|
||||
<constraint firstItem="873-oS-3w5" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="7" id="5Si-4n-UeD"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="873-oS-3w5" secondAttribute="bottom" constant="-8" id="Cbu-UA-Dp1"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="873-oS-3w5" secondAttribute="trailing" constant="8" id="xT0-Vu-xRT"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="firstLabel" destination="rSM-l0-O1T" id="r72-QM-vfI"/>
|
||||
<outlet property="secondLabel" destination="hWC-XB-oLE" id="H65-0M-Qnm"/>
|
||||
<outlet property="thirdlabel" destination="2OW-Hn-sOQ" id="bwu-Hk-IVr"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-323.5" y="-54"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QianDaoTimeLineView.h
|
||||
// CollectionViewTest
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 xiang. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface QianDaoTimeLineView : UIView
|
||||
|
||||
@property (nonatomic) int dayValue;
|
||||
@property (nonatomic) BOOL isSignInToday;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,91 @@
|
||||
//
|
||||
// QianDaoTimeLineView.m
|
||||
// CollectionViewTest
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 xiang. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoTimeLineView.h"
|
||||
|
||||
@implementation QianDaoTimeLineView
|
||||
|
||||
-(id)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
|
||||
[self creatSub];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)awakeFromNib{
|
||||
[super awakeFromNib];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
[self creatSub];
|
||||
|
||||
}
|
||||
|
||||
-(void)creatSub{
|
||||
|
||||
for (int i = 0; i<=6; i++) {
|
||||
CGFloat marginTosuper = 15;
|
||||
CGFloat imgW = 22;
|
||||
CGFloat lineW = (self.frame.size.width - 15*2 - imgW * 7)/6;
|
||||
|
||||
UIImageView *signInImg = [[UIImageView alloc] init];
|
||||
signInImg.frame = CGRectMake(marginTosuper+i*(imgW + lineW),0, imgW, imgW);
|
||||
[self addSubview:signInImg];
|
||||
if (!_dayValue) {
|
||||
_dayValue = 0;
|
||||
}
|
||||
if (i<6) {
|
||||
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(CGRectGetMaxX(signInImg.frame), CGRectGetMidY(signInImg.frame) -2, lineW, 2)];
|
||||
lineView.backgroundColor = [UIColor colorWithRed:255.0/256.0 green:115.0/256.0 blue:92.0/256.0 alpha:1];
|
||||
[self addSubview:lineView];
|
||||
if (i>=_dayValue) {
|
||||
lineView.backgroundColor = [UIColor colorWithRed:221.0/256.0 green:221.0/256.0 blue:221.0/256.0 alpha:1];
|
||||
}
|
||||
}
|
||||
|
||||
UILabel *title=[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMidX(signInImg.frame) - 36/2, CGRectGetMaxY(signInImg.frame) + 6,36,13)];
|
||||
title.text = [NSString stringWithFormat:@"第%d天",i + 1];
|
||||
title.textAlignment = NSTextAlignmentCenter;
|
||||
title.font = [UIFont systemFontOfSize:12];
|
||||
[self addSubview:title];
|
||||
|
||||
|
||||
if (i<_dayValue) {
|
||||
signInImg.image = [UIImage imageNamed:@"signin_condition_succeed"];
|
||||
title.textColor = [UIColor colorWithRed:153.0/256.0 green:153.0/256.0 blue:153.0/256.0 alpha:1];
|
||||
}else if (i==_dayValue){
|
||||
if (_isSignInToday) {
|
||||
signInImg.image = i==6 ? [UIImage imageNamed:@"signin_condition_gift_achieve"]: [UIImage imageNamed:@"signin_condition_succeed"];
|
||||
|
||||
}else{
|
||||
|
||||
signInImg.image = i==6 ? [UIImage imageNamed:@"signin_condition_gift_conduct"]: [UIImage imageNamed:@"signin_condition_conduct"];
|
||||
}
|
||||
|
||||
title.textColor = [UIColor colorWithRed:254.0/256.0 green:156.0/256.0 blue:139.0/256.0 alpha:1];
|
||||
|
||||
}else{
|
||||
|
||||
signInImg.image = i==6 ? [UIImage imageNamed:@"signin_condition_gift"]: [UIImage imageNamed:@"signin_condition_await"];
|
||||
title.textColor = [UIColor colorWithRed:221.0/256.0 green:221.0/256.0 blue:221.0/256.0 alpha:1];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// QianDaoTimeViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QianDaoTimeLineView.h"
|
||||
@interface QianDaoTimeViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *todayQianDaoGold;
|
||||
@property (weak, nonatomic) IBOutlet QianDaoTimeLineView *qianDaoTimeView;
|
||||
-(void)setQianDaoData;
|
||||
@end
|
||||
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// QianDaoTimeViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoTimeViewCell.h"
|
||||
|
||||
@implementation QianDaoTimeViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)setQianDaoData{
|
||||
|
||||
IfishUserAsset *asset = [dataContorl getAllIfishUserAsset];
|
||||
int keepsign = (int)asset.keepSigninNum;
|
||||
int dayValue =0;
|
||||
dayValue = keepsign;
|
||||
if (asset.toDaySignin) {
|
||||
//已签到时
|
||||
if (keepsign>=1) {
|
||||
//签到view 从0 算起
|
||||
dayValue = keepsign - 1;
|
||||
}
|
||||
}
|
||||
self.qianDaoTimeView.dayValue = dayValue;
|
||||
self.qianDaoTimeView.isSignInToday = asset.toDaySignin;
|
||||
NSString *goldAllStr = nil;
|
||||
NSMutableAttributedString * String = nil;
|
||||
|
||||
if (asset.toDaySignin) {
|
||||
|
||||
if (keepsign ==7) {
|
||||
goldAllStr = [NSString stringWithFormat:@"已获得%d金币+70金币的签到奖励",keepsign];
|
||||
NSString *gold =[NSString stringWithFormat:@"%d金币",keepsign];
|
||||
NSRange range = [goldAllStr rangeOfString:gold];
|
||||
NSRange godrange = [goldAllStr rangeOfString:@"70金币"];
|
||||
String = [[NSMutableAttributedString alloc] initWithString:goldAllStr];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:range];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:godrange];
|
||||
}else{
|
||||
goldAllStr = [NSString stringWithFormat:@"已获得%d金币的签到奖励",keepsign];
|
||||
NSString *gold =[NSString stringWithFormat:@"%d",keepsign];
|
||||
NSRange range = [goldAllStr rangeOfString:gold];
|
||||
String = [[NSMutableAttributedString alloc] initWithString:goldAllStr];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:range];
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
if (keepsign ==6) {
|
||||
goldAllStr = [NSString stringWithFormat:@"今天签到可获得%d金币+一份神秘礼物",keepsign +1];
|
||||
NSString *gold =[NSString stringWithFormat:@"%d金币",keepsign +1];
|
||||
NSRange range = [goldAllStr rangeOfString:gold];
|
||||
NSRange liwuRange = [goldAllStr rangeOfString:@"神秘礼物"];
|
||||
String = [[NSMutableAttributedString alloc] initWithString:goldAllStr];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:range];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:liwuRange];
|
||||
|
||||
}else{
|
||||
goldAllStr = [NSString stringWithFormat:@"今天签到可获得%d金币",keepsign +1];
|
||||
NSString *gold =[NSString stringWithFormat:@"%d",keepsign +1];
|
||||
NSRange range = [goldAllStr rangeOfString:gold];
|
||||
String = [[NSMutableAttributedString alloc] initWithString:goldAllStr];
|
||||
[String addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithRed:225.0/255.0 green:115.0/255.0 blue:92.0/255.0 alpha:1] range:range];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
self.todayQianDaoGold.attributedText = String;
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="QianDaoTimeViewCell" rowHeight="136" id="KGk-i7-Jjw" customClass="QianDaoTimeViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="136"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="135"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iWL-W0-4nY" customClass="QianDaoTimeLineView">
|
||||
<rect key="frame" x="0.0" y="60" width="375" height="67"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="67" id="yXg-sM-Sfu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0AX-EX-uz0">
|
||||
<rect key="frame" x="8" y="31" width="359" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="8Eg-23-BB9"/>
|
||||
</constraints>
|
||||
<attributedString key="attributedText">
|
||||
<fragment content="今天签到可获得">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="13" name=".PingFangSC-Regular"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
<fragment content="N">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" metaFont="system"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
<fragment content="金币">
|
||||
<attributes>
|
||||
<color key="NSColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<font key="NSFont" size="13" name=".PingFangSC-Regular"/>
|
||||
<paragraphStyle key="NSParagraphStyle" alignment="center" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
|
||||
</attributes>
|
||||
</fragment>
|
||||
</attributedString>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="iWL-W0-4nY" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leadingMargin" constant="-8" id="573-PE-ff9"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="iWL-W0-4nY" secondAttribute="trailing" constant="-8" id="JrB-Gp-B3b"/>
|
||||
<constraint firstItem="iWL-W0-4nY" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="VsJ-0d-gTT"/>
|
||||
<constraint firstItem="0AX-EX-uz0" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="jas-n5-WDy"/>
|
||||
<constraint firstItem="iWL-W0-4nY" firstAttribute="top" secondItem="0AX-EX-uz0" secondAttribute="bottom" constant="13" id="psG-Z7-nnR"/>
|
||||
<constraint firstAttribute="leadingMargin" secondItem="0AX-EX-uz0" secondAttribute="leading" id="r8w-8s-9G8"/>
|
||||
<constraint firstAttribute="bottomMargin" secondItem="iWL-W0-4nY" secondAttribute="bottom" constant="0.5" id="uZi-5D-G2x"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="0AX-EX-uz0" secondAttribute="trailing" id="zX6-gw-TCe"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="qianDaoTimeView" destination="iWL-W0-4nY" id="fgY-j3-rw1"/>
|
||||
<outlet property="todayQianDaoGold" destination="0AX-EX-uz0" id="ij6-5o-Wow"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="26.5" y="52"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// QianDaoWayTitleViewCell.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface QianDaoWayTitleViewCell : UITableViewCell
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// QianDaoWayTitleViewCell.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/6.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QianDaoWayTitleViewCell.h"
|
||||
|
||||
@implementation QianDaoWayTitleViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="QianDaoWayTitleViewCell" id="KGk-i7-Jjw" customClass="QianDaoWayTitleViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签到攻略" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GTU-ep-nfL">
|
||||
<rect key="frame" x="43" y="10.5" width="176" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="176" id="68a-es-PZM"/>
|
||||
<constraint firstAttribute="height" constant="21" id="txX-x4-Dzy"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R5z-lD-ily">
|
||||
<rect key="frame" x="0.0" y="43" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Ohl-p0-KoI"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="signin_strategy.png" translatesAutoresizingMaskIntoConstraints="NO" id="CVn-yq-ozC">
|
||||
<rect key="frame" x="15" y="12" width="18" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="iX9-PF-5NT"/>
|
||||
<constraint firstAttribute="width" constant="18" id="jfA-vu-N7w"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="R5z-lD-ily" secondAttribute="trailing" id="5Vy-cl-hDW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="R5z-lD-ily" secondAttribute="bottom" id="9RX-zX-Kmh"/>
|
||||
<constraint firstItem="R5z-lD-ily" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="F35-Xy-pcX"/>
|
||||
<constraint firstItem="GTU-ep-nfL" firstAttribute="centerY" secondItem="CVn-yq-ozC" secondAttribute="centerY" id="VeR-A3-SD6"/>
|
||||
<constraint firstAttribute="leadingMargin" secondItem="CVn-yq-ozC" secondAttribute="leading" constant="-7" id="d2I-Ay-gae"/>
|
||||
<constraint firstItem="CVn-yq-ozC" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="l5K-k3-WQO"/>
|
||||
<constraint firstItem="GTU-ep-nfL" firstAttribute="leading" secondItem="CVn-yq-ozC" secondAttribute="trailing" constant="10" id="lck-Hh-Ylt"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="signin_strategy.png" width="15" height="15"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// RenQuYinDaoVIew.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/8.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
//任务引导
|
||||
@interface RenQuYinDaoVIew : UIView
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// RenQuYinDaoVIew.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 17/3/8.
|
||||
// Copyright © 2017年 lianlian. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RenQuYinDaoVIew.h"
|
||||
#import "IfishUserDefaultHelper.h"
|
||||
@interface RenQuYinDaoVIew()
|
||||
@property (nonatomic,strong) UIImageView *yinDaoView;
|
||||
@end
|
||||
@implementation RenQuYinDaoVIew
|
||||
|
||||
-(id)initWithFrame:(CGRect)frame{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
UIView *holdView =[[UIView alloc] initWithFrame:CGRectMake(0,0, frame.size.width,6)];
|
||||
holdView.backgroundColor = [UIColor blackColor];
|
||||
holdView.alpha = 0.6;
|
||||
[self addSubview:holdView];
|
||||
[self bringSubviewToFront:self.yinDaoView];
|
||||
[self yinDaoImg];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)yinDaoImg
|
||||
{
|
||||
self.yinDaoView = [[UIImageView alloc] init ];
|
||||
self.yinDaoView.userInteractionEnabled = YES;
|
||||
[self addSubview:self.yinDaoView];
|
||||
self.yinDaoView.image = [UIImage imageNamed:@"signin_prompt"];
|
||||
if (self.frame.size.width ==320) {
|
||||
|
||||
self.yinDaoView.frame = CGRectMake(0,6, self.frame.size.width,kScreenSize.height);
|
||||
}else{
|
||||
self.yinDaoView.frame = CGRectMake(0,0, self.frame.size.width,kScreenSize.height);
|
||||
}
|
||||
|
||||
|
||||
self.yinDaoView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)];
|
||||
self.yinDaoView.userInteractionEnabled = YES;
|
||||
[self.yinDaoView addGestureRecognizer:tap];
|
||||
|
||||
}
|
||||
|
||||
-(void)dismissSelfViewTap{
|
||||
[IfishUserDefaultHelper IfishTaskIsShowed:YES];
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user