Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
superman9740 committed Aug 5, 2013
1 parent bd96e96 commit e9d50df
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -1065,3 +1065,53 @@ DerivedData/IMCPortal/Logs/Debug/534A176E-2CD6-471D-ADDC-DC74AF18E9FA.xcactivity
DerivedData/IMCPortal/Logs/Debug/A6211E5A-B9FD-45DD-B8EF-362718D283CF.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/E26F8F18-0854-49D1-9DD2-4BF3E33D80C8.xcactivitylog
DerivedData/IMCPortal/Logs/Issues/53D36B93-D9CF-4A47-B5E4-48B949599141.xcactivitylog
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-bgscjxuypzfyncgngjabiiykkehv/IMCPortal-Prefix.pch.d
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-bgscjxuypzfyncgngjabiiykkehv/IMCPortal-Prefix.pch.dia
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-bgscjxuypzfyncgngjabiiykkehv/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-bgscjxuypzfyncgngjabiiykkehv/IMCPortal-Prefix.pch.pth.hash-criteria
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-drdczltcbjawmxdsusdoemqbdeds/IMCPortal-Prefix.pch.d
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-drdczltcbjawmxdsusdoemqbdeds/IMCPortal-Prefix.pch.dia
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-drdczltcbjawmxdsusdoemqbdeds/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Build/Intermediates/PrecompiledHeaders/IMCPortal-Prefix-drdczltcbjawmxdsusdoemqbdeds/IMCPortal-Prefix.pch.pth.hash-criteria
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb-shm
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb-wal
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb.strings-cmp
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb.strings-dir
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb.strings-file
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb.strings-res
DerivedData/IMCPortal/Index/Debug/iphoneos7.0-armv7s/IMCPortal.xcindex/db.xcindexdb.strings-sym
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-akjptictqdyelfgnuobjafittlmf_ast/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-ayjyjfvrnnmtqmadctfzoipfdonn_ast/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-bhfxcpirunwayxfiqalpjzmfnwzv_ast/IMCPortal-Prefix.pch.pch
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-bhfxcpirunwayxfiqalpjzmfnwzv_ast/IMCPortal-Prefix.pch.pch.hash-criteria
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-bhfxcpirunwayxfiqalpjzmfnwzv_ast/IMCPortal-Prefix.pch.pch.target
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-ecbffoeylfnmilbnqpkashlasstb_ast/IMCPortal-Prefix.pch.pch
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-ecbffoeylfnmilbnqpkashlasstb_ast/IMCPortal-Prefix.pch.pch.hash-criteria
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-ecbffoeylfnmilbnqpkashlasstb_ast/IMCPortal-Prefix.pch.pch.target
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-focoflvztmuaazbgkjcoybqzuguz_ast/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-focoflvztmuaazbgkjcoybqzuguz_ast/IMCPortal-Prefix.pch.pth.hash-criteria
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-fpbushxsuxwyozgfypskmltwbxtv_ast/IMCPortal-Prefix.pch.pth.hash-criteria
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-fwhzeewafwobabachjmxjblyayix_ast/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Index/PrecompiledHeaders/IMCPortal-Prefix-gtnowdmpjgwrhgbppbolbqofllli_ast/IMCPortal-Prefix.pch.pth
DerivedData/IMCPortal/Logs/Build/02D9580A-0C67-4B80-A6DD-BE52DFA53EA4.xcactivitylog
DerivedData/IMCPortal/Logs/Build/13979AD2-23BF-47B8-B1D8-C00E7ECC6FB2.xcactivitylog
DerivedData/IMCPortal/Logs/Build/168F48F2-8EA9-4665-B46E-CDBFD4B65A1A.xcactivitylog
DerivedData/IMCPortal/Logs/Build/637DFCBE-E26B-4FD0-A1E3-A96F1C8ED0AC.xcactivitylog
DerivedData/IMCPortal/Logs/Build/70641438-DD71-4488-98B9-74E19E2A4902.xcactivitylog
DerivedData/IMCPortal/Logs/Build/8E189CEF-4BD9-484A-8C15-53217325FEA4.xcactivitylog
DerivedData/IMCPortal/Logs/Build/BF4BDFF2-3952-4D50-971A-B5D1B1AECB34.xcactivitylog
DerivedData/IMCPortal/Logs/Build/D42BA5D3-581D-406D-A93F-0823C360266F.xcactivitylog
DerivedData/IMCPortal/Logs/Build/DF6DFB16-6228-4CAC-826B-54F25D764727.xcactivitylog
DerivedData/IMCPortal/Logs/Build/FA4DE674-D461-4623-890C-B264C2D5999D.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/064E3851-F47A-46C9-AFD3-50309255FD12.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/12AD90C2-D017-42FE-A379-CC33E9FF6F40.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/39E347AF-6641-4A33-B115-245B8C083608.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/4D24C867-15D4-4A23-BEE2-FB694741F9C3.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/60C0DB60-5A7A-4EBB-BDB3-E06F7211A60D.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/652648F9-5EA9-4C93-9323-B922C9A670CD.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/B2C3C60E-3BB1-4844-9A33-024CC6DAFA7F.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/D1706355-14C9-402D-A67F-7E0BCD1CD7FA.xcactivitylog
DerivedData/IMCPortal/Logs/Debug/E2E225E6-2E4C-432D-BE8F-60D4CEA3471A.xcactivitylog
DerivedData/IMCPortal/Logs/Issues/AA912901-87EE-443B-BF51-0F6A6AE36EF2.xcactivitylog
IMCPortal.xcodeproj/project.xcworkspace/xcshareddata/IMCPortal.xccheckout
Binary file not shown.
2 changes: 1 addition & 1 deletion imc/IMCImageItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
UIButton* clickButton;
}

@property (nonatomic, strong) UILabel* thumbnailLabel;
@property (nonatomic, strong) UITextView* thumbnailLabel;

- (id)initWithItemDictionary:(NSDictionary*)dictionary showLabel:(BOOL) bShowLabel;
-(void) addShadow;
Expand Down
12 changes: 8 additions & 4 deletions imc/IMCImageItem.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ - (id)initWithItemDictionary:(NSDictionary*)dictionary showLabel:(BOOL) bShowLab
[self addSubview:thumbnailImage];

if (bShowLabel) {
_thumbnailLabel = [[UILabel alloc] initWithFrame:CGRectZero];
[_thumbnailLabel setShadowColor:[UIColor clearColor]];
_thumbnailLabel = [[UITextView alloc] initWithFrame:CGRectZero];
// [_thumbnailLabel setShadowColor:[UIColor clearColor]];
[_thumbnailLabel setBackgroundColor:[UIColor clearColor]];
NSString* tempText = [dictionary xmlGetNodeAttribute:@"title"];
tempText = [tempText stringByReplacingOccurrencesOfString:@"\n" withString:@"\\n"];

[_thumbnailLabel setText:[dictionary xmlGetNodeAttribute:@"title"]];
[_thumbnailLabel setTextAlignment:NSTextAlignmentCenter];
Expand All @@ -44,6 +46,8 @@ - (id)initWithItemDictionary:(NSDictionary*)dictionary showLabel:(BOOL) bShowLab

CGRect frame = _thumbnailLabel.frame;
frame.size.width = requiredSize.width;
frame.size.height += 10;

_thumbnailLabel.frame = frame;

[self addSubview:_thumbnailLabel];
Expand All @@ -67,8 +71,8 @@ -(void) addShadow {
-(void) layoutSubviews {
if (_thumbnailLabel) {
[thumbnailImage setFrame:CGRectMake(0, 0, self.frame.size.width, 2*self.frame.size.height/3)];
[_thumbnailLabel setFrame:CGRectMake(0, 2*self.frame.size.height/3 + 20,
self.frame.size.width, 20)];
[_thumbnailLabel setFrame:CGRectMake(0, 2*self.frame.size.height/3 + 10,
self.frame.size.width, 60)];
}else {
[thumbnailImage setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
Expand Down

0 comments on commit e9d50df

Please sign in to comment.