Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
KittenYang committed Mar 13, 2015
1 parent 26282ee commit 2331aec
Show file tree
Hide file tree
Showing 9 changed files with 130 additions and 49 deletions.
8 changes: 4 additions & 4 deletions KittenYang/KittenYang.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
5F215D5E192F408B00DAFD22 /* libWeiboSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F215D5B192F408B00DAFD22 /* libWeiboSDK.a */; };
5F215D5F192F408B00DAFD22 /* WeiboSDK.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 5F215D5C192F408B00DAFD22 /* WeiboSDK.bundle */; };
5F215D63192F40E000DAFD22 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F215D61192F40E000DAFD22 /* HomeViewController.m */; };
5F215D64192F40E000DAFD22 /* HomeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F215D62192F40E000DAFD22 /* HomeViewController.xib */; };
5F215D69192F415600DAFD22 /* MessageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F215D67192F415600DAFD22 /* MessageViewController.m */; };
5F215D6A192F415600DAFD22 /* MessageViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F215D68192F415600DAFD22 /* MessageViewController.xib */; };
5F215D6E192F416D00DAFD22 /* ProfileViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F215D6C192F416D00DAFD22 /* ProfileViewController.m */; };
Expand Down Expand Up @@ -497,6 +496,7 @@
5F26C13219D802DA00C79443 /* WebModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F26C13019D802DA00C79443 /* WebModalViewController.xib */; };
5F26C13619DCEF8900C79443 /* topicModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F26C13419DCEF8900C79443 /* topicModalViewController.m */; };
5F26C13719DCEF8900C79443 /* topicModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F26C13519DCEF8900C79443 /* topicModalViewController.xib */; };
5F28898B1AAF5A0900E64BAD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5F28898A1AAF5A0900E64BAD /* Main.storyboard */; };
5F2C475A199C6A25004B64DA /* BrowseModeController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F2C4758199C6A25004B64DA /* BrowseModeController.m */; };
5F2C475B199C6A25004B64DA /* BrowseModeController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5F2C4759199C6A25004B64DA /* BrowseModeController.xib */; };
5F3E819419E92D5E0009D0E8 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F3E819319E92D5E0009D0E8 /* CoreLocation.framework */; };
Expand Down Expand Up @@ -614,7 +614,6 @@
5F215D5D192F408B00DAFD22 /* WeiboSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeiboSDK.h; sourceTree = "<group>"; };
5F215D60192F40E000DAFD22 /* HomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HomeViewController.h; path = libWeiboSDK/HomeViewController.h; sourceTree = "<group>"; };
5F215D61192F40E000DAFD22 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HomeViewController.m; path = libWeiboSDK/HomeViewController.m; sourceTree = "<group>"; };
5F215D62192F40E000DAFD22 /* HomeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = HomeViewController.xib; path = libWeiboSDK/HomeViewController.xib; sourceTree = "<group>"; };
5F215D66192F415600DAFD22 /* MessageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageViewController.h; sourceTree = "<group>"; };
5F215D67192F415600DAFD22 /* MessageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageViewController.m; sourceTree = "<group>"; };
5F215D68192F415600DAFD22 /* MessageViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MessageViewController.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1113,6 +1112,7 @@
5F26C13319DCEF8900C79443 /* topicModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = topicModalViewController.h; sourceTree = "<group>"; };
5F26C13419DCEF8900C79443 /* topicModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = topicModalViewController.m; sourceTree = "<group>"; };
5F26C13519DCEF8900C79443 /* topicModalViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = topicModalViewController.xib; sourceTree = "<group>"; };
5F28898A1AAF5A0900E64BAD /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
5F2C4757199C6A25004B64DA /* BrowseModeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BrowseModeController.h; sourceTree = "<group>"; };
5F2C4758199C6A25004B64DA /* BrowseModeController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BrowseModeController.m; sourceTree = "<group>"; };
5F2C4759199C6A25004B64DA /* BrowseModeController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BrowseModeController.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1323,7 +1323,6 @@
children = (
5F215D60192F40E000DAFD22 /* HomeViewController.h */,
5F215D61192F40E000DAFD22 /* HomeViewController.m */,
5F215D62192F40E000DAFD22 /* HomeViewController.xib */,
5F6B7F1B197E2AEA00137F17 /* WeiboCell.h */,
5F6B7F1C197E2AEA00137F17 /* WeiboCell.m */,
5F6B7F1E197E2B2600137F17 /* WeiboView.h */,
Expand Down Expand Up @@ -2032,6 +2031,7 @@
5F5E4268191796F8004B6476 /* AppDelegate.m */,
5F215D55192F3FE200DAFD22 /* MainViewController.h */,
5F215D56192F3FE200DAFD22 /* MainViewController.m */,
5F28898A1AAF5A0900E64BAD /* Main.storyboard */,
5F4375AF19DFFB7F00CFE688 /* SendViewController */,
5F215D96192F469900DAFD22 /* Theme */,
5F215D65192F40F000DAFD22 /* Home */,
Expand Down Expand Up @@ -2412,6 +2412,7 @@
5F216108192F49F000DAFD22 /* page_image_loading.png in Resources */,
5F21605D192F49F000DAFD22 /* [email protected] in Resources */,
5F215FE6192F49F000DAFD22 /* 024.gif in Resources */,
5F28898B1AAF5A0900E64BAD /* Main.storyboard in Resources */,
5F215F99192F49F000DAFD22 /* [email protected] in Resources */,
5F21604A192F49F000DAFD22 /* 057.png in Resources */,
5F2160F9192F49F000DAFD22 /* [email protected] in Resources */,
Expand Down Expand Up @@ -2726,7 +2727,6 @@
5F216059192F49F000DAFD22 /* 062.png in Resources */,
5F216051192F49F000DAFD22 /* [email protected] in Resources */,
5F2160D9192F49F000DAFD22 /* emoticon_keyboard_background.png in Resources */,
5F215D64192F40E000DAFD22 /* HomeViewController.xib in Resources */,
5F2160A5192F49F000DAFD22 /* [email protected] in Resources */,
5F2160E3192F49F000DAFD22 /* icon_detail.png in Resources */,
5F215FA2192F49F000DAFD22 /* [email protected] in Resources */,
Expand Down
Binary file not shown.
30 changes: 15 additions & 15 deletions KittenYang/KittenYang/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[WeiboSDK enableDebugMode:YES];
[WeiboSDK registerApp:kAppKey];

[[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor blackColor];
[self.window makeKeyAndVisible];


_mainCtrl = [[MainViewController alloc]init];
LeftViewController * leftCtrl = [[LeftViewController alloc]init];
RightViewController * rightCtrl = [[RightViewController alloc]init];

_menu = [[DDMenuController alloc]initWithRootViewController:_mainCtrl];
_menu.leftViewController = leftCtrl;
_menu.rightViewController = rightCtrl;

self.window.rootViewController = _menu;
// [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleLightContent];
// self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// self.window.backgroundColor = [UIColor blackColor];
// [self.window makeKeyAndVisible];
//
//
// _mainCtrl = [[MainViewController alloc]init];
// LeftViewController * leftCtrl = [[LeftViewController alloc]init];
// RightViewController * rightCtrl = [[RightViewController alloc]init];
//
// _menu = [[DDMenuController alloc]initWithRootViewController:_mainCtrl];
// _menu.leftViewController = leftCtrl;
// _menu.rightViewController = rightCtrl;
//
// self.window.rootViewController = _menu;



Expand Down
2 changes: 2 additions & 0 deletions KittenYang/KittenYang/KittenYang-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand Down
100 changes: 100 additions & 0 deletions KittenYang/KittenYang/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="cMV-xg-OU0">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
</dependencies>
<scenes>
<!--Tab Bar Controller-->
<scene sceneID="7Wj-5W-NKN">
<objects>
<tabBarController automaticallyAdjustsScrollViewInsets="NO" id="cMV-xg-OU0" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="g4N-8g-J0W">
<rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="S62-hB-syp" kind="relationship" relationship="viewControllers" id="EG9-gF-Are"/>
<segue destination="LQQ-iD-zbA" kind="relationship" relationship="viewControllers" id="sHE-di-ZX6"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="RV3-D6-913" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="537" y="-58"/>
</scene>
<!--Item-->
<scene sceneID="yw1-o6-BQw">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="sI4-fj-BQo" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController id="S62-hB-syp" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="Qce-CO-dpq"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="T6k-Ki-35g">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="9iY-Cn-cQb" kind="relationship" relationship="rootViewController" id="FEB-Px-COl"/>
</connections>
</navigationController>
</objects>
<point key="canvasLocation" x="-298" y="767"/>
</scene>
<!--Item-->
<scene sceneID="JT7-Xz-VN0">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="YdH-Zd-ddr" userLabel="First Responder" sceneMemberID="firstResponder"/>
<navigationController id="LQQ-iD-zbA" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Item" id="xdK-ad-lhr"/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="eXb-7a-ovQ">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="Ccb-XB-JqJ" kind="relationship" relationship="rootViewController" id="dLl-Du-yYr"/>
</connections>
</navigationController>
</objects>
<point key="canvasLocation" x="1074" y="767"/>
</scene>
<!--Home View Controller-->
<scene sceneID="SO1-Qq-w8C">
<objects>
<viewController id="9iY-Cn-cQb" customClass="HomeViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="SfD-JX-MAy"/>
<viewControllerLayoutGuide type="bottom" id="I8t-9D-abC"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="HUL-Eh-K73">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="eHB-B4-HIW"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dHs-K8-sB1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-298" y="1620"/>
</scene>
<!--View Controller-->
<scene sceneID="1l6-cY-q3U">
<objects>
<viewController id="Ccb-XB-JqJ" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="5JO-c3-9ZQ"/>
<viewControllerLayoutGuide type="bottom" id="fnd-Ya-PfS"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="oLm-Zo-Ay0">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" id="i3v-pT-oKU"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ezr-Mg-9xK" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1046" y="1680"/>
</scene>
</scenes>
</document>
1 change: 1 addition & 0 deletions KittenYang/KittenYang/MainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ - (void) selectedTab:(UIButton *)button {
}

- (void)timerAction:(NSTimer *)timer{


[WBHttpRequest requestWithAccessToken:[self getToken] url:WB_unRead httpMethod:@"GET" params:nil delegate:self withTag:@"unRead"];
}
Expand Down
9 changes: 4 additions & 5 deletions KittenYang/KittenYang/WeiboView.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ - (void)parseLink{
}

//layoutSubviews 展示数据、设置子视图布局
//layoutSubviews 可能会被调用多次,所以不能在这里进行正则表达式的解析
//layoutSubviews 可能会被调用多次,所以不能在这里进行正则表达式的解析
- (void)layoutSubviews{
[super layoutSubviews];

Expand Down Expand Up @@ -203,8 +203,6 @@ - (void)layoutSubviews{
}else{
_image.hidden = YES;
}


}
}

Expand Down Expand Up @@ -295,6 +293,8 @@ +(CGFloat)getWeiboViewHeight:(WeiboModel *)weiboModel isDetail:(BOOL)isDetail i
return height;
}



+(float)getFontSize:(BOOL)isDetail isRepost:(BOOL)isRepost{
float fontSize = 14.0f;
if (!isDetail && !isRepost) {
Expand All @@ -306,8 +306,7 @@ +(float)getFontSize:(BOOL)isDetail isRepost:(BOOL)isRepost{
}else if (isDetail && !isRepost){
return DETAIL_FONT;
}



return fontSize;

}
Expand Down
8 changes: 4 additions & 4 deletions KittenYang/KittenYang/libWeiboSDK/HomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,10 @@ - (void)didReceiveMemoryWarning
// Dispose of any resources that can be recreated.
}

- (void)viewDidDisappear:(BOOL)animated{
UIButton *bt = [self.tabBarController.tabBar.subviews objectAtIndex:6];
bt.selected = NO;
}
//- (void)viewDidDisappear:(BOOL)animated{
// UIButton *bt = [self.tabBarController.tabBar.subviews objectAtIndex:6];
// bt.selected = NO;
//}

-(void)viewWillAppear:(BOOL)animated{
self.tabBarController.tabBar.hidden = NO;
Expand Down
21 changes: 0 additions & 21 deletions KittenYang/KittenYang/libWeiboSDK/HomeViewController.xib

This file was deleted.

0 comments on commit 2331aec

Please sign in to comment.