修复消息页面部分bug

This commit is contained in:
wbzhan
2019-05-27 16:41:39 +08:00
parent 25c051d5f1
commit 8e027e82c9
16 changed files with 355 additions and 546 deletions
@@ -44,7 +44,6 @@
#import "IfishUserObsever.h"
#import "QianDaoGiftView.h"
#import "IfishGoldAndExpTostView.h"
//#import "MineHeaderNewItemsCell.h"
#import "IfishMineGoldViewController.h"
#import "IifshMineDJViewController.h"
#import "WoDeRenWuViewController.h"
@@ -1,27 +0,0 @@
//
// MineHeaderNewItemsCell.h
// Ifish
//
// Created by imac on 17/3/13.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol MineHeaderItemsDelegate <NSObject>
-(void)tapDengjiAction;
-(void)tapGoldAction;
-(void)tapRenWuAction;
@end
@interface MineHeaderNewItemsCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UILabel *levlellabel;
@property (weak, nonatomic) IBOutlet UILabel *goldLabel;
@property (weak, nonatomic) IBOutlet UILabel *taskNumber;
@property (weak, nonatomic) IBOutlet UILabel *dengJi;
@property (weak, nonatomic) IBOutlet UILabel *jinBi;
@property (weak, nonatomic) IBOutlet UILabel *renWu;
@property (nonatomic,assign) id<MineHeaderItemsDelegate> itemsDelegate;
-(void)loadCellData;
@property (nonatomic,strong) UIView *redpontView;
@end
@@ -1,113 +0,0 @@
//
// MineHeaderNewItemsCell.m
// Ifish
//
// Created by imac on 17/3/13.
// Copyright © 2017年 lianlian. All rights reserved.
//
#import "MineHeaderNewItemsCell.h"
@implementation MineHeaderNewItemsCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
UITapGestureRecognizer *tapDengji=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dengjiAction)];
UITapGestureRecognizer *tapDengji2=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dengjiAction2)];
[self.dengJi addGestureRecognizer:tapDengji];
[self.levlellabel addGestureRecognizer:tapDengji2];
UITapGestureRecognizer *tapgold=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGoldAction)];
[self.goldLabel addGestureRecognizer:tapgold];
UITapGestureRecognizer *tapgold2=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGoldAction2)];
[self.jinBi addGestureRecognizer:tapgold2];
UITapGestureRecognizer *tapRenWu=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRenWuAction)];
UITapGestureRecognizer *tapRenWu2=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRenWuAction2)];
[self.renWu addGestureRecognizer:tapRenWu];
[self.taskNumber addGestureRecognizer:tapRenWu2];
}
-(void)layoutSubviews{
if (!self.redpontView) {
self.redpontView = [[UIView alloc] init];
NSString *renwu= @"我的任务";
CGSize size = [renwu sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]}];
self.redpontView.frame = CGRectMake(CGRectGetWidth(self.renWu.frame)/2 + size.width/2, 4, 8, 8);
self.redpontView.backgroundColor = RGB(252, 89, 89);
self.redpontView.layer.masksToBounds = YES;
self.redpontView.layer.cornerRadius = 4.0;
[self addSubview:self.redpontView];
[self.renWu bringSubviewToFront:self.redpontView];
}
}
-(void)loadCellData{
IfishUserAsset *userAsset =[dataContorl getAllIfishUserAsset];
self.levlellabel.text = [NSString stringWithFormat:@"LV%@",userAsset.gradeNum];
self.goldLabel.text = [NSString stringWithFormat:@"%ld",(long)userAsset.goldValue];
NSInteger undoneCount = [IfishHelperUtils getUnDoneTaskCount];
self.taskNumber.text = [NSString stringWithFormat:@"%ld",undoneCount];
self.redpontView.hidden = undoneCount ==0? YES : NO;
if (undoneCount==0) {
[[NSNotificationCenter defaultCenter] postNotificationName:IFISHTASK_HAVEDONEALL object:nil];
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
-(void)dengjiAction
{
if (self.itemsDelegate) {
[self.itemsDelegate tapDengjiAction];
}
}
-(void)dengjiAction2
{
if (self.itemsDelegate) {
[self.itemsDelegate tapDengjiAction];
}
}
-(void)tapGoldAction
{
if (self.itemsDelegate) {
[self.itemsDelegate tapGoldAction];
}
}
-(void)tapGoldAction2
{
if (self.itemsDelegate) {
[self.itemsDelegate tapGoldAction];
}
}
-(void)tapRenWuAction
{
if (self.itemsDelegate) {
[self.itemsDelegate tapRenWuAction];
}
}
-(void)tapRenWuAction2
{
if (self.itemsDelegate) {
[self.itemsDelegate tapRenWuAction];
}
}
@end
@@ -1,89 +0,0 @@
<?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="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="MineHeaderNewItemsCell" id="KGk-i7-Jjw" customClass="MineHeaderNewItemsCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
<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="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="等级" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O45-QR-cHa">
<rect key="frame" x="21" y="0.0" width="82" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9wv-Em-ymJ">
<rect key="frame" x="8" y="29" width="108" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.9882352941176471" green="0.85098039215686272" blue="0.36862745098039218" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="277777" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YNL-Tj-AKG">
<rect key="frame" x="134" y="29" width="105" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.98823529409999999" green="0.85098039219999999" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UFF-ah-s4k">
<rect key="frame" x="257" y="29" width="110" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.98823529409999999" green="0.85098039219999999" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lAB-ez-ZeT">
<rect key="frame" x="124" y="13" width="2" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.047058823529411764" green="0.46274509803921571" blue="0.85098039215686272" alpha="0.69555004222972971" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uhm-GO-5Ke">
<rect key="frame" x="247" y="13" width="2" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.047058823530000002" green="0.46274509800000002" blue="0.85098039219999999" alpha="0.69555004220000005" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="我的任务" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hah-cc-Hgz">
<rect key="frame" x="271" y="0.0" width="82" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.98823529409999999" green="0.85098039219999999" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="金币" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B6H-GU-HKz">
<rect key="frame" x="134" y="0.0" width="105" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<color key="backgroundColor" red="0.039215686270000001" green="0.41960784309999999" blue="0.7725490196" alpha="1" colorSpace="calibratedRGB"/>
<inset key="separatorInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
<connections>
<outlet property="dengJi" destination="O45-QR-cHa" id="LfW-VK-4g0"/>
<outlet property="goldLabel" destination="YNL-Tj-AKG" id="ogk-kt-ySC"/>
<outlet property="jinBi" destination="B6H-GU-HKz" id="CS2-5L-R8c"/>
<outlet property="levlellabel" destination="9wv-Em-ymJ" id="bTK-L1-Xe0"/>
<outlet property="renWu" destination="Hah-cc-Hgz" id="gtx-WH-xHK"/>
<outlet property="taskNumber" destination="UFF-ah-s4k" id="DPn-Bh-Vxz"/>
</connections>
<point key="canvasLocation" x="25.5" y="52"/>
</tableViewCell>
</objects>
</document>