Skip to content

Commit

Permalink
簡單的支援 ipad 的版本, fix #10
Browse files Browse the repository at this point in the history
  • Loading branch information
DaidoujiChen committed Dec 4, 2014
1 parent a1efc7c commit 184d9e4
Show file tree
Hide file tree
Showing 16 changed files with 277 additions and 13 deletions.
22 changes: 22 additions & 0 deletions e-Hentai.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
0150034419B6E5E90055F47D /* TFHpple.m in Sources */ = {isa = PBXBuildFile; fileRef = 0150033919B6E5E90055F47D /* TFHpple.m */; };
0150034519B6E5E90055F47D /* TFHppleElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 0150033B19B6E5E90055F47D /* TFHppleElement.m */; };
0150034619B6E5E90055F47D /* XPathQuery.m in Sources */ = {isa = PBXBuildFile; fileRef = 0150033D19B6E5E90055F47D /* XPathQuery.m */; };
01519AEF1A304C820091C985 /* IPadMainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01519AEE1A304C820091C985 /* IPadMainViewController.xib */; };
01519AF11A3051280091C985 /* IPadPhotoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01519AF01A3051280091C985 /* IPadPhotoViewController.xib */; };
01519AF31A3053200091C985 /* IPadDownloadManagerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01519AF21A3053200091C985 /* IPadDownloadManagerViewController.xib */; };
01519AF51A3053BA0091C985 /* IPadDownloadManagerCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 01519AF41A3053BA0091C985 /* IPadDownloadManagerCell.xib */; };
015755421A3055B4009083B4 /* IPadSearchFilterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 015755411A3055B4009083B4 /* IPadSearchFilterViewController.xib */; };
015B89E819FF9B2500CFA9DE /* SupportKitLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 015B89E619FF9B2500CFA9DE /* SupportKitLocalizable.strings */; };
01624CE81A0B5A6400568EC8 /* DaiInboxHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 01624CE11A0B5A6400568EC8 /* DaiInboxHUD.m */; };
01624CE91A0B5A6400568EC8 /* DaiInboxView.m in Sources */ = {isa = PBXBuildFile; fileRef = 01624CE31A0B5A6400568EC8 /* DaiInboxView.m */; };
Expand Down Expand Up @@ -133,6 +138,11 @@
0150033B19B6E5E90055F47D /* TFHppleElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TFHppleElement.m; sourceTree = "<group>"; };
0150033C19B6E5E90055F47D /* XPathQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPathQuery.h; sourceTree = "<group>"; };
0150033D19B6E5E90055F47D /* XPathQuery.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPathQuery.m; sourceTree = "<group>"; };
01519AEE1A304C820091C985 /* IPadMainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IPadMainViewController.xib; sourceTree = "<group>"; };
01519AF01A3051280091C985 /* IPadPhotoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IPadPhotoViewController.xib; sourceTree = "<group>"; };
01519AF21A3053200091C985 /* IPadDownloadManagerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = IPadDownloadManagerViewController.xib; path = DownloadManagerViewController/IPadDownloadManagerViewController.xib; sourceTree = "<group>"; };
01519AF41A3053BA0091C985 /* IPadDownloadManagerCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = IPadDownloadManagerCell.xib; path = DownloadManagerViewController/DownloadManagerCell/IPadDownloadManagerCell.xib; sourceTree = "<group>"; };
015755411A3055B4009083B4 /* IPadSearchFilterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = IPadSearchFilterViewController.xib; path = SearchFilterViewController/IPadSearchFilterViewController.xib; sourceTree = "<group>"; };
015B89E419FF9AC900CFA9DE /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
015B89E719FF9B2500CFA9DE /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/SupportKitLocalizable.strings"; sourceTree = "<group>"; };
01624CE01A0B5A6400568EC8 /* DaiInboxHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DaiInboxHUD.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -294,6 +304,7 @@
0118080E19B6F06200FE0DA1 /* MainViewController.h */,
0118080F19B6F06200FE0DA1 /* MainViewController.m */,
0118081019B6F06200FE0DA1 /* MainViewController.xib */,
01519AEE1A304C820091C985 /* IPadMainViewController.xib */,
04376DF819B96B76001B1599 /* GalleryCell */,
017AE5BE1A00D22E00317939 /* SearchFilterViewController */,
);
Expand All @@ -306,6 +317,7 @@
0118081219B6F06200FE0DA1 /* PhotoViewController.h */,
0118081319B6F06200FE0DA1 /* PhotoViewController.m */,
0118081419B6F06200FE0DA1 /* PhotoViewController.xib */,
01519AF01A3051280091C985 /* IPadPhotoViewController.xib */,
01BBD5FD19E3D415003538CF /* HentaiPhotoCell */,
);
path = PhotoViewController;
Expand Down Expand Up @@ -452,6 +464,7 @@
0179766119E27E8D00E9005E /* DownloadManagerCell.h */,
0179766219E27E8D00E9005E /* DownloadManagerCell.m */,
0179766319E27E8D00E9005E /* DownloadManagerCell.xib */,
01519AF41A3053BA0091C985 /* IPadDownloadManagerCell.xib */,
);
name = DownloadManagerCell;
sourceTree = "<group>";
Expand All @@ -473,6 +486,7 @@
017AE5BF1A00D24600317939 /* SearchFilterViewController.h */,
017AE5C01A00D24600317939 /* SearchFilterViewController.m */,
017AE5C11A00D24600317939 /* SearchFilterViewController.xib */,
015755411A3055B4009083B4 /* IPadSearchFilterViewController.xib */,
);
name = SearchFilterViewController;
sourceTree = "<group>";
Expand Down Expand Up @@ -621,6 +635,7 @@
01CD0E2B19DE808B006155FD /* DownloadManagerViewController.h */,
01CD0E2C19DE808B006155FD /* DownloadManagerViewController.m */,
01CD0E2D19DE808B006155FD /* DownloadManagerViewController.xib */,
01519AF21A3053200091C985 /* IPadDownloadManagerViewController.xib */,
0179766019E27E7B00E9005E /* DownloadManagerCell */,
);
name = DownloadManagerViewController;
Expand Down Expand Up @@ -710,9 +725,11 @@
019926A119ADDB83009F814B /* Images.xcassets in Resources */,
01BFAD5219DE435700A5649F /* SettingViewController.xib in Resources */,
0179766519E27E8D00E9005E /* DownloadManagerCell.xib in Resources */,
01519AEF1A304C820091C985 /* IPadMainViewController.xib in Resources */,
01CD0E2F19DE808B006155FD /* DownloadManagerViewController.xib in Resources */,
017AE5C71A00D7DD00317939 /* HentaiPrefer.plist in Resources */,
0118081A19B6F06200FE0DA1 /* MainViewController.xib in Resources */,
01519AF51A3053BA0091C985 /* IPadDownloadManagerCell.xib in Resources */,
0180D91F1A0212C8002554FC /* [email protected] in Resources */,
017AE5C51A00D26A00317939 /* HentaiFilters.plist in Resources */,
0180D9271A02139F002554FC /* [email protected] in Resources */,
Expand All @@ -723,13 +740,16 @@
0180D92F1A0214AD002554FC /* [email protected] in Resources */,
0199269319ADDB83009F814B /* InfoPlist.strings in Resources */,
0180D9201A0212C8002554FC /* [email protected] in Resources */,
01519AF31A3053200091C985 /* IPadDownloadManagerViewController.xib in Resources */,
016DAD9919E392F900E528BE /* GooglePlus.bundle in Resources */,
0180D9301A0214AD002554FC /* [email protected] in Resources */,
0180D92B1A02140E002554FC /* [email protected] in Resources */,
04376DFD19B96B76001B1599 /* GalleryCell.xib in Resources */,
01519AF11A3051280091C985 /* IPadPhotoViewController.xib in Resources */,
01BBD60219E3D428003538CF /* HentaiPhotoCell.xib in Resources */,
015B89E819FF9B2500CFA9DE /* SupportKitLocalizable.strings in Resources */,
0180D92C1A02140E002554FC /* [email protected] in Resources */,
015755421A3055B4009083B4 /* IPadSearchFilterViewController.xib in Resources */,
0180D9281A02139F002554FC /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -941,6 +961,7 @@
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "e-Hentai";
PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Debug;
Expand Down Expand Up @@ -969,6 +990,7 @@
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "e-Hentai";
PROVISIONING_PROFILE = "";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ @implementation DownloadManagerCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:self options:nil];
NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:xibName owner:self options:nil];
self = arrayOfViews[0];
}
return self;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment defaultVersion="1792" identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</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="DownloadManagerCell" rowHeight="138" id="OK6-uw-0K0" customClass="DownloadManagerCell">
<rect key="frame" x="0.0" y="0.0" width="748" height="137"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OK6-uw-0K0" id="2cU-i4-myx">
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Ins-4d-s0M">
<rect key="frame" x="8" y="8" width="80" height="120"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" lineBreakMode="middleTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="196" translatesAutoresizingMaskIntoConstraints="NO" id="abV-aA-Cep">
<rect key="frame" x="96" y="11" width="644" height="89"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" preferredMaxLayoutWidth="196" translatesAutoresizingMaskIntoConstraints="NO" id="mgX-AF-ZKX">
<rect key="frame" x="96" y="108" width="644" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
<connections>
<outlet property="statusLabel" destination="mgX-AF-ZKX" id="m7V-NH-kQN"/>
<outlet property="thumbnailImageView" destination="Ins-4d-s0M" id="0We-uF-qpA"/>
<outlet property="titleLabel" destination="abV-aA-Cep" id="N5h-aO-VLV"/>
</connections>
<point key="canvasLocation" x="284" y="165.5"/>
</tableViewCell>
</objects>
</document>
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa

#pragma mark - life cycle

- (id)init {
self = [super initWithNibName:xibName bundle:nil];
if (self) {
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"下載管理員";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DownloadManagerViewController">
<connections>
<outlet property="downloadManagerTableView" destination="vBC-aH-1Dw" id="X54-OH-fgt"/>
<outlet property="view" destination="VOy-Q0-dLp" id="f0f-ue-xCh"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="VOy-Q0-dLp">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="10" sectionFooterHeight="10" translatesAutoresizingMaskIntoConstraints="NO" id="vBC-aH-1Dw">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<connections>
<outlet property="dataSource" destination="-1" id="yuo-1i-xeN"/>
<outlet property="delegate" destination="-1" id="xfj-XN-aMv"/>
</connections>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="iPad"/>
<point key="canvasLocation" x="87" y="400"/>
</view>
</objects>
</document>
7 changes: 6 additions & 1 deletion e-Hentai/DownloadedViewController/DownloadedViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ - (void)hentaiDownloadSuccess:(NSNotification *)notification {
#pragma mark - life cycle

- (id)init {
self = [super initWithNibName:@"MainViewController" bundle:nil];
if (isIPad) {
self = [super initWithNibName:@"IPadMainViewController" bundle:nil];
}
else {
self = [super initWithNibName:@"MainViewController" bundle:nil];
}
if (self) {
}
return self;
Expand Down
40 changes: 40 additions & 0 deletions e-Hentai/MainViewController/IPadMainViewController.xib
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MainViewController">
<connections>
<outlet property="listCollectionView" destination="avo-DQ-App" id="GuV-k4-Nvt"/>
<outlet property="view" destination="Gzl-JQ-7Es" id="9hU-69-beU"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Gzl-JQ-7Es">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" minimumZoomScale="0.0" maximumZoomScale="0.0" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="avo-DQ-App">
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="20" minimumInteritemSpacing="10" id="iqM-KE-RVo">
<size key="itemSize" width="145" height="200"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="25" minY="10" maxX="25" maxY="10"/>
</collectionViewFlowLayout>
<cells/>
<connections>
<outlet property="dataSource" destination="-1" id="aWU-rO-0VK"/>
<outlet property="delegate" destination="-1" id="SON-15-NOv"/>
</connections>
</collectionView>
</subviews>
<gestureRecognizers/>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="iPad"/>
</view>
</objects>
</document>
7 changes: 7 additions & 0 deletions e-Hentai/MainViewController/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,13 @@ - (void)setupRecvNotifications {

#pragma mark - life cycle

- (id)init {
self = [super initWithNibName:xibName bundle:nil];
if (self) {
}
return self;
}

- (void)viewDidLoad {
[super viewDidLoad];
[self setupInitValues];
Expand Down
Loading

0 comments on commit 184d9e4

Please sign in to comment.