Skip to content
Browse files

cell

  • Loading branch information...
1 parent 186bf7a commit f76637eca9b08af8bc5abc3887d7b3f2c244814f @WindStill committed
View
4 sparrow.xcodeproj/project.pbxproj
@@ -313,12 +313,14 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 170FFE6909894292A7C01327 /* Pods.xcconfig */;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DSTROOT = /tmp/xcodeproj.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "sparrow/sparrow-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "sparrow/sparrow-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = app;
};
@@ -328,12 +330,14 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 170FFE6909894292A7C01327 /* Pods.xcconfig */;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DSTROOT = /tmp/xcodeproj.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "sparrow/sparrow-Prefix.pch";
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "sparrow/sparrow-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
+ "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = app;
};
View
BIN sparrow.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
12 sparrow/ActivityTableViewController.m
@@ -124,16 +124,22 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
NSString *action = nil;
if ([type isEqualToString:@"vote_up_answer"]) {
title = [[activity objectForKey:@"question"] objectForKey:@"title"];
- avatar_url = [[activity objectForKey:@"voter"] objectForKey:@"avatar_url"];
+ NSDictionary *voter = [activity objectForKey:@"voter"];
+ avatar_url = [voter objectForKey:@"avatar_url"];
+ action = [NSString stringWithFormat:@"%@ 赞同了该回答", [voter objectForKey:@"name"]];
}else if ([type isEqualToString:@"subscribe_post"]) {
title = [[activity objectForKey:@"question"] objectForKey:@"title"];
- avatar_url = [[activity objectForKey:@"subscriber"] objectForKey:@"avatar_url"];
+ NSDictionary *subscriber = [activity objectForKey:@"subscriber"];
+ avatar_url = [subscriber objectForKey:@"avatar_url"];
+ action = [NSString stringWithFormat:@"%@ 关注了该问题", [subscriber objectForKey:@"name"]];
}else if ([type isEqualToString:@"ask"]) {
title = [[activity objectForKey:@"question"] objectForKey:@"title"];
avatar_url = [[[activity objectForKey:@"question"] objectForKey:@"user"] objectForKey:@"avatar_url"];
+ action = [NSString stringWithFormat:@"%@ 创建了该问题", [[[activity objectForKey:@"question"] objectForKey:@"user"] objectForKey:@"name"]];
}else if ([type isEqualToString:@"answer"]) {
title = [[activity objectForKey:@"question"] objectForKey:@"title"];
avatar_url = [[[activity objectForKey:@"answer"] objectForKey:@"user"] objectForKey:@"avatar_url"];
+ action = [NSString stringWithFormat:@"%@ 回答了该问题", [[[activity objectForKey:@"answer"] objectForKey:@"user"] objectForKey:@"name"]];
}
UIImageView * imageView = (UIImageView *)[cell viewWithTag:1];
@@ -142,6 +148,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
placeholderImage:[UIImage imageNamed:@"111-user.png"]];
UILabel *titleLabel = (UILabel *)[cell viewWithTag:2];
titleLabel.text = title;
+ UILabel *actionLabel = (UILabel *)[cell viewWithTag:3];
+ actionLabel.text = action;
// cell.textLabel.text = title;
// cell.textLabel.font = [UIFont boldSystemFontOfSize:14];
View
36 sparrow/en.lproj/MainStoryboard.storyboard
@@ -106,10 +106,42 @@
<view key="view" contentMode="scaleToFill" id="COw-s3-5Z0">
<rect key="frame" x="0.0" y="64" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <searchBar contentMode="redraw" id="06w-Gf-tfS">
+ <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+ <textInputTraits key="textInputTraits"/>
+ <connections>
+ <outlet property="delegate" destination="jjl-Gd-Adm" id="orG-ib-2uX"/>
+ </connections>
+ </searchBar>
+ <segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" id="DkV-ha-ueT">
+ <rect key="frame" x="-1" y="44" width="323" height="44"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <segments>
+ <segment title="问题"/>
+ <segment title="用户"/>
+ <segment title="频道"/>
+ <segment title="标签"/>
+ </segments>
+ </segmentedControl>
+ </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="搜索" id="KLo-zY-cY2"/>
+ <connections>
+ <outlet property="searchDisplayController" destination="U8L-4S-fR4" id="3uV-Im-brz"/>
+ </connections>
</viewController>
+ <searchDisplayController id="U8L-4S-fR4">
+ <connections>
+ <outlet property="delegate" destination="jjl-Gd-Adm" id="L04-AW-5MD"/>
+ <outlet property="searchBar" destination="06w-Gf-tfS" id="bpV-hd-C8w"/>
+ <outlet property="searchContentsController" destination="jjl-Gd-Adm" id="MsF-5A-iYC"/>
+ <outlet property="searchResultsDataSource" destination="jjl-Gd-Adm" id="9zM-Uv-HNb"/>
+ <outlet property="searchResultsDelegate" destination="jjl-Gd-Adm" id="pef-Tm-kEd"/>
+ </connections>
+ </searchDisplayController>
</objects>
<point key="canvasLocation" x="282" y="136"/>
</scene>
@@ -222,11 +254,11 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
- <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="李园园 回答了该问题" lineBreakMode="tailTruncation" minimumFontSize="10" id="aeh-Ci-Qsm">
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" tag="3" contentMode="left" text="李园园 回答了该问题" lineBreakMode="tailTruncation" minimumFontSize="10" id="aeh-Ci-Qsm">
<rect key="frame" x="63" y="48" width="231" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
- <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+ <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>

0 comments on commit f76637e

Please sign in to comment.
Something went wrong with that request. Please try again.