Skip to content

Commit c474576

Browse files
author
embeddedc
committed
Add sorting button
1 parent 5d3a48c commit c474576

File tree

6 files changed

+42
-3
lines changed

6 files changed

+42
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "sortingImage-1.png",
5+
"idiom" : "tv",
6+
"scale" : "1x"
7+
},
8+
{
9+
"filename" : "sortingImage.png",
10+
"idiom" : "tv",
11+
"scale" : "2x"
12+
}
13+
],
14+
"info" : {
15+
"author" : "xcode",
16+
"version" : 1
17+
}
18+
}
2.25 KB
Loading
2.59 KB
Loading

Apple-TV/VLCOpenNetworkStreamTVViewController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
@property (readwrite, nonatomic, weak) IBOutlet UIImageView *nothingFoundConeImageView;
2323

2424
@property (readwrite, nonatomic, weak) IBOutlet UIButton *emptyListButton;
25+
@property (readwrite, nonatomic, weak) IBOutlet UIButton *reverseListSortingButton;
2526

2627
- (IBAction)URLEnteredInField:(id)sender;
2728
- (IBAction)emptyListAction:(id)sender;
29+
- (IBAction)reverseListSortingAction:(id)sender;
2830

2931
@end

Apple-TV/VLCOpenNetworkStreamTVViewController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ - (void)emptyListAction:(id)sender
204204
[self presentViewController:alertController animated:YES completion:nil];
205205
}
206206

207+
- (IBAction)reverseListSortingAction:(id)sender
208+
{
209+
float degrees = 180.0;
210+
self.reverseListSortingButton.transform = CGAffineTransformMakeRotation( degrees / 180.0 * M_PI );
211+
}
212+
207213
#pragma mark - editing
208214

209215
- (NSIndexPath *)indexPathToDelete

Apple-TV/VLCOpenNetworkStreamTVViewController.xib

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="20037" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder.AppleTV.XIB" version="3.0" toolsVersion="19529" targetRuntime="AppleTV" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
33
<device id="appleTV" appearance="light"/>
44
<dependencies>
55
<deployment identifier="tvOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
77
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
88
</dependencies>
99
<objects>
1010
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VLCOpenNetworkStreamTVViewController">
1111
<connections>
1212
<outlet property="deleteHintView" destination="Wa3-IS-ztU" id="ipW-Hx-fMJ"/>
13-
<outlet property="emptyListButton" destination="OXZ-Zx-045" id="kJS-RB-MGp"/>
13+
<outlet property="emptyListButton" destination="OXZ-Zx-045" id="amt-Xy-VhT"/>
1414
<outlet property="nothingFoundConeImageView" destination="aAb-aY-bkT" id="Abp-Yt-oQb"/>
1515
<outlet property="nothingFoundLabel" destination="sdc-e1-PSc" id="dvi-jc-vaR"/>
1616
<outlet property="nothingFoundView" destination="dvt-CP-ALF" id="lg3-aJ-oHg"/>
1717
<outlet property="playURLField" destination="dWa-3n-YCa" id="Eoe-vT-AuM"/>
1818
<outlet property="preferredFocusedView" destination="dWa-3n-YCa" id="0Ez-4Z-KFF"/>
1919
<outlet property="previouslyPlayedStreamsTableView" destination="v0o-s0-Xaz" id="I1r-ie-lFf"/>
20+
<outlet property="reverseListSortingButton" destination="S9C-So-1TT" id="Wys-kF-xwY"/>
2021
<outlet property="view" destination="iN0-l3-epB" id="Eym-vH-oyN"/>
2122
</connections>
2223
</placeholder>
@@ -83,6 +84,17 @@
8384
<action selector="emptyListAction:" destination="-1" eventType="primaryActionTriggered" id="Pp6-st-y2N"/>
8485
</connections>
8586
</button>
87+
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="S9C-So-1TT">
88+
<rect key="frame" x="1439" y="190" width="128" height="88"/>
89+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
90+
<inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
91+
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
92+
<state key="normal" image="delete"/>
93+
<buttonConfiguration key="configuration" style="gray" image="sortingImage"/>
94+
<connections>
95+
<action selector="reverseListSortingAction:" destination="-1" eventType="primaryActionTriggered" id="pFj-w5-Hp2"/>
96+
</connections>
97+
</button>
8698
</subviews>
8799
<constraints>
88100
<constraint firstItem="Wa3-IS-ztU" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="0ms-Lt-g1Q"/>
@@ -105,5 +117,6 @@
105117
<image name="cone" width="143" height="158"/>
106118
<image name="delete" width="24" height="24"/>
107119
<image name="deleteImage" width="48" height="48"/>
120+
<image name="sortingImage" width="48" height="48"/>
108121
</resources>
109122
</document>

0 commit comments

Comments
 (0)