Skip to content

Commit 86536bf

Browse files
committed
Update images
Update images
1 parent bdf8cea commit 86536bf

File tree

10 files changed

+103
-11
lines changed

10 files changed

+103
-11
lines changed

MJDownloadExample/MJDownloadExample/Base.lproj/Main.storyboard

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7703" systemVersion="14E36b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="6Rp-IA-mJ3">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7703" systemVersion="14F6a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="6Rp-IA-mJ3">
33
<dependencies>
44
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6711"/>
55
</dependencies>
@@ -82,20 +82,25 @@
8282
<autoresizingMask key="autoresizingMask"/>
8383
<subviews>
8484
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h7B-f9-z31">
85-
<rect key="frame" x="500" y="38" width="60" height="30"/>
86-
<state key="normal" title="开始下载">
85+
<rect key="frame" x="496" y="21" width="64" height="64"/>
86+
<constraints>
87+
<constraint firstAttribute="height" constant="64" id="O44-37-Dgn"/>
88+
<constraint firstAttribute="width" constant="64" id="Zib-R9-M7c"/>
89+
</constraints>
90+
<state key="normal">
8791
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
8892
</state>
8993
<connections>
9094
<action selector="download:" destination="N8C-WS-GrP" eventType="touchUpInside" id="tBe-jo-kQW"/>
9195
</connections>
9296
</button>
9397
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gp8-TT-DCH">
94-
<rect key="frame" x="500" y="38" width="60" height="30"/>
95-
<state key="normal" title="打开文件">
96-
<color key="titleColor" red="0.8862745098" green="0.1843137255" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
97-
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
98-
</state>
98+
<rect key="frame" x="496" y="21" width="64" height="64"/>
99+
<constraints>
100+
<constraint firstAttribute="height" constant="64" id="LCY-c4-WAp"/>
101+
<constraint firstAttribute="width" constant="64" id="k7u-d5-Ap4"/>
102+
</constraints>
103+
<state key="normal" backgroundImage="check"/>
99104
<connections>
100105
<action selector="download:" destination="N8C-WS-GrP" eventType="touchUpInside" id="Bs6-u6-hgm"/>
101106
<action selector="open:" destination="N8C-WS-GrP" eventType="touchUpInside" id="HXR-FW-vKC"/>
@@ -149,4 +154,7 @@
149154
<point key="canvasLocation" x="350" y="798"/>
150155
</scene>
151156
</scenes>
157+
<resources>
158+
<image name="check" width="128" height="128"/>
159+
</resources>
152160
</document>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "check.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "clock.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "download.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x",
6+
"filename" : "pause.png"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}
Loading

MJDownloadExample/MJDownloadExample/MJFileCell.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ - (void)setUrl:(NSString *)url
3838
self.downloadButton.hidden = NO;
3939
self.progressView.hidden = NO;
4040

41-
[self.downloadButton setTitle:@"等待下载" forState:UIControlStateNormal];
41+
[self.downloadButton setBackgroundImage:[UIImage imageNamed:@"clock"] forState:UIControlStateNormal];
4242
} else {
4343
self.openButton.hidden = YES;
4444
self.downloadButton.hidden = NO;
@@ -56,9 +56,9 @@ - (void)setUrl:(NSString *)url
5656
}
5757

5858
if (info.state == MJDownloadStateResumed) {
59-
[self.downloadButton setTitle:@"暂停下载" forState:UIControlStateNormal];
59+
[self.downloadButton setBackgroundImage:[UIImage imageNamed:@"pause"] forState:UIControlStateNormal];
6060
} else {
61-
[self.downloadButton setTitle:@"开始下载" forState:UIControlStateNormal];
61+
[self.downloadButton setBackgroundImage:[UIImage imageNamed:@"download"] forState:UIControlStateNormal];
6262
}
6363
}
6464
}

0 commit comments

Comments
 (0)