Commit d51796be by 刘卓鑫

no message

parent 7f6720e0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array/>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" 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="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UserInfoViewController">
<connections>
<outlet property="countLabel" destination="gjl-Oz-xQK" id="42K-Mw-0bS"/>
<outlet property="nameLabel" destination="383-j9-XU4" id="p4D-Rh-rTR"/>
<outlet property="tableView" destination="ysd-OO-Byz" id="aEf-EX-cco"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wRZ-Pu-923">
<rect key="frame" x="0.0" y="0.0" width="375" height="213"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineNavBg" translatesAutoresizingMaskIntoConstraints="NO" id="Dmk-Ex-6bG">
<rect key="frame" x="0.0" y="0.0" width="375" height="213.00000000000006"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Head-portrait" translatesAutoresizingMaskIntoConstraints="NO" id="8Ve-aK-QjO">
<rect key="frame" x="21" y="95.999999999999986" width="80.000000000000028" height="80.000000000000043"/>
<constraints>
<constraint firstAttribute="height" constant="80" id="WpZ-6c-kAN"/>
<constraint firstAttribute="width" constant="80" id="uYv-9V-SWh"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X6K-MS-ziL">
<rect key="frame" x="116" y="96" width="249" height="80"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="383-j9-XU4">
<rect key="frame" x="0.0" y="20" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gjl-Oz-xQK">
<rect key="frame" x="0.0" y="44" width="33" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="gjl-Oz-xQK" firstAttribute="leading" secondItem="X6K-MS-ziL" secondAttribute="leading" id="aWp-ET-ScL"/>
<constraint firstItem="383-j9-XU4" firstAttribute="top" secondItem="X6K-MS-ziL" secondAttribute="top" constant="20" id="mDG-t3-zuE"/>
<constraint firstItem="383-j9-XU4" firstAttribute="leading" secondItem="X6K-MS-ziL" secondAttribute="leading" id="vlT-6D-yuU"/>
<constraint firstAttribute="bottom" secondItem="gjl-Oz-xQK" secondAttribute="bottom" constant="20" id="zWn-oh-QAO"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="个人信息" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zjT-VM-5xn">
<rect key="frame" x="151" y="25" width="73.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="B2U-xJ-iwx">
<rect key="frame" x="20" y="29" width="26" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="26" id="SOD-b0-TYe"/>
<constraint firstAttribute="height" constant="26" id="o9M-D4-ghg"/>
</constraints>
<state key="normal" title="Button" image="个人返回-1"/>
<connections>
<action selector="backBtnClick:" destination="-1" eventType="touchUpInside" id="He8-xJ-rse"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="8Ve-aK-QjO" firstAttribute="leading" secondItem="wRZ-Pu-923" secondAttribute="leading" constant="21" id="0Ps-3e-BIL"/>
<constraint firstAttribute="bottom" secondItem="Dmk-Ex-6bG" secondAttribute="bottom" id="Dc2-LQ-B8S"/>
<constraint firstItem="Dmk-Ex-6bG" firstAttribute="leading" secondItem="wRZ-Pu-923" secondAttribute="leading" id="Ps6-Pm-5j9"/>
<constraint firstAttribute="bottom" secondItem="8Ve-aK-QjO" secondAttribute="bottom" constant="37" id="S40-nA-cbW"/>
<constraint firstItem="Dmk-Ex-6bG" firstAttribute="top" secondItem="wRZ-Pu-923" secondAttribute="top" id="VDD-7C-cHU"/>
<constraint firstAttribute="trailing" secondItem="Dmk-Ex-6bG" secondAttribute="trailing" id="akT-j3-3Qp"/>
<constraint firstItem="X6K-MS-ziL" firstAttribute="centerY" secondItem="8Ve-aK-QjO" secondAttribute="centerY" id="d8U-u0-bn3"/>
<constraint firstAttribute="height" constant="213" id="e5h-GJ-Fzf"/>
<constraint firstItem="X6K-MS-ziL" firstAttribute="height" secondItem="8Ve-aK-QjO" secondAttribute="height" id="f2R-oc-CPv"/>
<constraint firstAttribute="trailing" secondItem="X6K-MS-ziL" secondAttribute="trailing" constant="10" id="hUa-75-Gss"/>
<constraint firstItem="X6K-MS-ziL" firstAttribute="leading" secondItem="8Ve-aK-QjO" secondAttribute="trailing" constant="15" id="hz3-j6-F3k"/>
<constraint firstItem="zjT-VM-5xn" firstAttribute="top" secondItem="wRZ-Pu-923" secondAttribute="top" constant="25" id="iPv-Gl-qaJ"/>
<constraint firstItem="zjT-VM-5xn" firstAttribute="centerX" secondItem="wRZ-Pu-923" secondAttribute="centerX" id="j7p-Sx-NBD"/>
<constraint firstItem="B2U-xJ-iwx" firstAttribute="top" secondItem="wRZ-Pu-923" secondAttribute="top" constant="29" id="k0p-Rl-2J6"/>
<constraint firstItem="B2U-xJ-iwx" firstAttribute="leading" secondItem="wRZ-Pu-923" secondAttribute="leading" constant="20" id="mnk-Em-2a4"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="ysd-OO-Byz">
<rect key="frame" x="0.0" y="213" width="375" height="454"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
</tableView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="ysd-OO-Byz" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="3pV-km-hCR"/>
<constraint firstAttribute="trailing" secondItem="ysd-OO-Byz" secondAttribute="trailing" id="5SX-Qo-wrn"/>
<constraint firstAttribute="bottom" secondItem="ysd-OO-Byz" secondAttribute="bottom" id="Duv-I7-nmK"/>
<constraint firstItem="wRZ-Pu-923" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="IFa-9T-bbs"/>
<constraint firstItem="ysd-OO-Byz" firstAttribute="top" secondItem="wRZ-Pu-923" secondAttribute="bottom" id="WJk-8P-Qxk"/>
<constraint firstItem="wRZ-Pu-923" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="o8g-Sj-rej"/>
<constraint firstAttribute="trailing" secondItem="wRZ-Pu-923" secondAttribute="trailing" id="x9x-Yn-cXh"/>
</constraints>
<point key="canvasLocation" x="-623" y="14"/>
</view>
</objects>
<resources>
<image name="Head-portrait" width="161" height="161"/>
<image name="mineNavBg" width="380" height="214"/>
<image name="个人返回-1" width="58" height="58"/>
</resources>
</document>
//
//
// ZXBDSteamTableViewCell.h
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/5/28.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface ZXBDSteamTableViewCell : UITableViewCell
@property (nonatomic, weak) UIViewController *fromVc;
@property (nonatomic, strong) UIWebView *webView;
@property (nonatomic, assign) BOOL isOpenScrool;
@end
NS_ASSUME_NONNULL_END
//
//
// ZXBDSteamTableViewCell.m
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/5/28.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import "ZXBDSteamTableViewCell.h"
#import "LoginJump.h"
#import <AdSupport/ASIdentifierManager.h>
#import "ZXNewsViewController.h"
@interface ZXBDSteamTableViewCell()<UIWebViewDelegate, UIScrollViewDelegate>
@property (nonatomic, copy) NSString *webUrl;
@property (nonatomic, assign) BOOL scrollIsUp;
@end
@implementation ZXBDSteamTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
LoginJump *m = [LoginJump findAll].lastObject;
NSDictionary *diccc = [ZXTool dictionaryWithJsonString:[m.modelUrl mj_JSONString]];
UILabel *la;
if (diccc[@"title"] != nil && ![diccc[@"title"] isEqualToString:@""]) {
la = [[UILabel alloc] init];
[self.contentView addSubview:la];
[la mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.contentView);
make.top.equalTo(self.contentView).offset(15 * k6Scale);
}];
la.textAlignment = NSTextAlignmentCenter;
la.backgroundColor = [UIColor whiteColor];
la.text = diccc[@"title"]?diccc[@"title"]:@"热点资讯";
UIView *line = [[UIView alloc] init];
[self.contentView addSubview:line];
line.backgroundColor = kRGBColor(239, 239, 239, 1);
[line mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(la.mas_bottom).offset(15 * k6Scale);
make.height.mas_equalTo(1);
make.left.equalTo(self.contentView.mas_left).offset(15 * k6Scale);
make.right.equalTo(self.contentView.mas_right).offset(-15 * k6Scale);
}];
}
self.webView = [[UIWebView alloc] init];
[self.contentView addSubview:self.webView];
self.webView.delegate = self;
[self.webView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.equalTo(self.contentView);
if (la) {
make.top.equalTo(la.mas_bottom).offset(16 * k6Scale);
} else {
make.top.equalTo(self.contentView);
}
}];
self.webView.scrollView.delegate = self;
CGFloat bottomMargin = 49;
if (iPhoneX) {
bottomMargin = 83;
}
if (diccc && diccc[@"url"]) {
ASIdentifierManager *asIM = [[ASIdentifierManager alloc] init];
NSString *idfa = [asIM.advertisingIdentifier UUIDString];
NSString *jumpUrl = [[[[[[[diccc[@"url"] stringByReplacingOccurrencesOfString:@"${schoolid}" withString:CacheCampusId] stringByReplacingOccurrencesOfString:@"${userid}" withString:CacheUserId] stringByReplacingOccurrencesOfString:@"${im}" withString:@"none"] stringByReplacingOccurrencesOfString:@"${ia}" withString:idfa] stringByReplacingOccurrencesOfString:@"${imMD5}" withString:@"none"] stringByReplacingOccurrencesOfString:@"${androidId}" withString:@"none"] stringByReplacingOccurrencesOfString:@"${versionid}" withString:APPversion];
self.webUrl = jumpUrl;
[self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:jumpUrl]]];
}
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
if (![request.URL.absoluteString isEqualToString:self.webUrl]) {
ZXNewsViewController *VC = [[ZXNewsViewController alloc] init];
VC.jumpUrl = request.URL.absoluteString;
[self.fromVc.navigationController pushViewController:VC animated:YES];
return NO;
}
return YES;
}
//-(void)scrollViewDidScroll:(UIScrollView *)scrollView{
// CGRect startRact = [self.webView convertRect:self.webView.bounds toView:kAppWindow];
// CGPoint sliderMargin = [scrollView.panGestureRecognizer velocityInView:scrollView];
// if (sliderMargin.y > 0) {
// NSLog(@"向下-%f---%@", scrollView.contentOffset.y, NSStringFromCGRect(startRact));
// self.scrollIsUp = NO;
// } else {
// NSLog(@"向上-%f---%@", scrollView.contentOffset.y, NSStringFromCGRect(startRact));
// self.scrollIsUp = YES;
//
// }
//}
- (void)setIsOpenScrool:(BOOL)isOpenScrool {
_isOpenScrool = isOpenScrool;
self.webView.scrollView.scrollEnabled = _isOpenScrool;
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment