mirror of
https://github.com/wu736139669/ManagerDemo.git
synced 2026-08-05 05:55:42 +00:00
modify
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
A93F8806199A077F00875287 /* OtherListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A93F87FF199A077F00875287 /* OtherListViewController.m */; };
|
||||
A94FE51E199C9C3C00626DE5 /* MoveSocialCellView.m in Sources */ = {isa = PBXBuildFile; fileRef = A94FE51D199C9C3C00626DE5 /* MoveSocialCellView.m */; };
|
||||
A94FE520199C9C6800626DE5 /* MoveSocialCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A94FE51F199C9C6800626DE5 /* MoveSocialCellView.xib */; };
|
||||
A96F2A7C199D008200608237 /* UIButton+Bootstrap.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F2A7B199D008200608237 /* UIButton+Bootstrap.m */; };
|
||||
A96F2A7F199D01C000608237 /* NSString+FontAwesome.m in Sources */ = {isa = PBXBuildFile; fileRef = A96F2A7E199D01C000608237 /* NSString+FontAwesome.m */; };
|
||||
A988A8FC199A50D900EB10AA /* TriangleView.m in Sources */ = {isa = PBXBuildFile; fileRef = A988A8FB199A50D900EB10AA /* TriangleView.m */; };
|
||||
A988A900199A751500EB10AA /* FundListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A988A8FF199A751500EB10AA /* FundListCell.m */; };
|
||||
A988A902199A755300EB10AA /* FundListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A988A901199A755300EB10AA /* FundListCell.xib */; };
|
||||
@@ -150,6 +152,10 @@
|
||||
A94FE51C199C9C3C00626DE5 /* MoveSocialCellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoveSocialCellView.h; sourceTree = "<group>"; };
|
||||
A94FE51D199C9C3C00626DE5 /* MoveSocialCellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoveSocialCellView.m; sourceTree = "<group>"; };
|
||||
A94FE51F199C9C6800626DE5 /* MoveSocialCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MoveSocialCellView.xib; sourceTree = "<group>"; };
|
||||
A96F2A7A199D008200608237 /* UIButton+Bootstrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+Bootstrap.h"; sourceTree = "<group>"; };
|
||||
A96F2A7B199D008200608237 /* UIButton+Bootstrap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+Bootstrap.m"; sourceTree = "<group>"; };
|
||||
A96F2A7D199D01C000608237 /* NSString+FontAwesome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+FontAwesome.h"; sourceTree = "<group>"; };
|
||||
A96F2A7E199D01C000608237 /* NSString+FontAwesome.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+FontAwesome.m"; sourceTree = "<group>"; };
|
||||
A988A8FA199A50D900EB10AA /* TriangleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TriangleView.h; sourceTree = "<group>"; };
|
||||
A988A8FB199A50D900EB10AA /* TriangleView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TriangleView.m; sourceTree = "<group>"; };
|
||||
A988A8FE199A751500EB10AA /* FundListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FundListCell.h; sourceTree = "<group>"; };
|
||||
@@ -329,6 +335,17 @@
|
||||
path = MoveView;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A96F2A79199D007700608237 /* UIButtonUtil */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A96F2A7D199D01C000608237 /* NSString+FontAwesome.h */,
|
||||
A96F2A7E199D01C000608237 /* NSString+FontAwesome.m */,
|
||||
A96F2A7A199D008200608237 /* UIButton+Bootstrap.h */,
|
||||
A96F2A7B199D008200608237 /* UIButton+Bootstrap.m */,
|
||||
);
|
||||
path = UIButtonUtil;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A988A8F9199A50B600EB10AA /* UIViewShape */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -478,6 +495,7 @@
|
||||
A9AF6C4A19949B510076C0EE /* Common */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A96F2A79199D007700608237 /* UIButtonUtil */,
|
||||
A988A8F9199A50B600EB10AA /* UIViewShape */,
|
||||
A93F87C71999E4DA00875287 /* AttributedString */,
|
||||
A93F877D1999B91600875287 /* SlideSwitch */,
|
||||
@@ -803,7 +821,9 @@
|
||||
A9AF6C3D199486CA0076C0EE /* ProductListViewController.m in Sources */,
|
||||
A93F87741999AA8300875287 /* ManagerUtil.m in Sources */,
|
||||
A9AF6C941994C5700076C0EE /* UIScrollView+Extension.m in Sources */,
|
||||
A96F2A7C199D008200608237 /* UIButton+Bootstrap.m in Sources */,
|
||||
A9AF6C47199498D10076C0EE /* MoreViewController.m in Sources */,
|
||||
A96F2A7F199D01C000608237 /* NSString+FontAwesome.m in Sources */,
|
||||
A9EAA035199857F5001A872A /* HomeMainView.m in Sources */,
|
||||
A93F8805199A077F00875287 /* LoanListViewController.m in Sources */,
|
||||
A9AF6C951994C5700076C0EE /* UIScrollView+MJRefresh.m in Sources */,
|
||||
|
||||
BIN
Binary file not shown.
@@ -25,4 +25,9 @@
|
||||
* 系统字体
|
||||
*/
|
||||
#define Font_Black(fontsize) [UIFont fontWithName:@"HelveticaNeue-Bold" size:fontsize];
|
||||
|
||||
/**
|
||||
* 点击的背景颜色
|
||||
*/
|
||||
#define Touch_BackGroudColor [UIColor colorWithWhite:0.5 alpha:0.1]
|
||||
#endif
|
||||
|
||||
@@ -28,4 +28,8 @@
|
||||
*
|
||||
*/
|
||||
+(UIView*)lineWithColor:(UIColor*)color withAlpha:(CGFloat)alpha withFrame:(CGRect)frame;
|
||||
|
||||
+(UIView*)selectBackgroudViewWithFrame:(CGRect)frame;
|
||||
|
||||
+ (UIImage *) buttonImageFromColor:(UIColor *)color withFrame:(CGRect)frame;
|
||||
@end
|
||||
|
||||
@@ -67,4 +67,20 @@
|
||||
[lineView setBackgroundColor:color];
|
||||
return lineView;
|
||||
}
|
||||
+(UIView*)selectBackgroudViewWithFrame:(CGRect)frame
|
||||
{
|
||||
UIView* selectBackgroudView = [[UIView alloc] initWithFrame:frame];
|
||||
selectBackgroudView.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.1];
|
||||
return selectBackgroudView;
|
||||
}
|
||||
+ (UIImage *) buttonImageFromColor:(UIColor *)color withFrame:(CGRect)frame{
|
||||
CGRect rect = CGRectMake(0, 0, frame.size.width, frame.size.height);
|
||||
UIGraphicsBeginImageContext(rect.size);
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextSetFillColorWithColor(context, [color CGColor]);
|
||||
CGContextFillRect(context, rect);
|
||||
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
return img;
|
||||
}
|
||||
@end
|
||||
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
//
|
||||
// NSString+FontAwesome.h
|
||||
//
|
||||
// Created by Pit Garbe on 27.09.12.
|
||||
// Copyright (c) 2012 Pit Garbe. All rights reserved.
|
||||
//
|
||||
// https://github.com/leberwurstsaft/FontAwesome-for-iOS
|
||||
//
|
||||
//
|
||||
// * The Font Awesome font is licensed under the SIL Open Font License
|
||||
// http://scripts.sil.org/OFL
|
||||
//
|
||||
//
|
||||
// * Font Awesome CSS, LESS, and SASS files are licensed under the MIT License
|
||||
// http://opensource.org/licenses/mit-license.html
|
||||
//
|
||||
//
|
||||
// * The Font Awesome pictograms are licensed under the CC BY 3.0 License
|
||||
// http://creativecommons.org/licenses/by/3.0
|
||||
//
|
||||
//
|
||||
// * Attribution is no longer required in Font Awesome 3.0, but much appreciated:
|
||||
// "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
|
||||
//
|
||||
//
|
||||
// -----------------------------------------
|
||||
// Edited and refactored by Jesse Squires on 2 April, 2013.
|
||||
//
|
||||
// http://github.com/jessesquires/BButton
|
||||
//
|
||||
// http://hexedbits.com
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef enum {
|
||||
FAIconGlass = 0,
|
||||
FAIconMusic,
|
||||
FAIconSearch,
|
||||
FAIconEnvelope,
|
||||
FAIconHeart,
|
||||
FAIconStar,
|
||||
FAIconStarEmpty,
|
||||
FAIconUser,
|
||||
FAIconFilm,
|
||||
FAIconThLarge,
|
||||
FAIconTh,
|
||||
FAIconThList,
|
||||
FAIconOk,
|
||||
FAIconRemove,
|
||||
FAIconZoomIn,
|
||||
FAIconZoomOut,
|
||||
FAIconOff,
|
||||
FAIconSignal,
|
||||
FAIconCog,
|
||||
FAIconTrash,
|
||||
FAIconHome,
|
||||
FAIconFile,
|
||||
FAIconTime,
|
||||
FAIconRoad,
|
||||
FAIconDownloadAlt,
|
||||
FAIconDownload,
|
||||
FAIconUpload,
|
||||
FAIconInbox,
|
||||
FAIconPlayCircle,
|
||||
FAIconRepeat,
|
||||
FAIconRefresh,
|
||||
FAIconListAlt,
|
||||
FAIconLock,
|
||||
FAIconFlag,
|
||||
FAIconHeadphones,
|
||||
FAIconVolumeOff,
|
||||
FAIconVolumeDown,
|
||||
FAIconVolumeUp,
|
||||
FAIconQrcode,
|
||||
FAIconBarcode,
|
||||
FAIconTag,
|
||||
FAIconTags,
|
||||
FAIconBook,
|
||||
FAIconBookmark,
|
||||
FAIconPrint,
|
||||
FAIconCamera,
|
||||
FAIconFont,
|
||||
FAIconBold,
|
||||
FAIconItalic,
|
||||
FAIconTextHeight,
|
||||
FAIconTextWidth,
|
||||
FAIconAlignLeft,
|
||||
FAIconAlignCenter,
|
||||
FAIconAlignRight,
|
||||
FAIconAlignJustify,
|
||||
FAIconList,
|
||||
FAIconIndentLeft,
|
||||
FAIconIndentRight,
|
||||
FAIconFacetimeVideo,
|
||||
FAIconPicture,
|
||||
FAIconPencil,
|
||||
FAIconMapMarker,
|
||||
FAIconAdjust,
|
||||
FAIconTint,
|
||||
FAIconEdit,
|
||||
FAIconShare,
|
||||
FAIconCheck,
|
||||
FAIconMove,
|
||||
FAIconStepBackward,
|
||||
FAIconFastBackward,
|
||||
FAIconBackward,
|
||||
FAIconPlay,
|
||||
FAIconPause,
|
||||
FAIconStop,
|
||||
FAIconForward,
|
||||
FAIconFastForward,
|
||||
FAIconStepForward,
|
||||
FAIconEject,
|
||||
FAIconChevronLeft,
|
||||
FAIconChevronRight,
|
||||
FAIconPlusSign,
|
||||
FAIconMinusSign,
|
||||
FAIconRemoveSign,
|
||||
FAIconOkSign,
|
||||
FAIconQuestionSign,
|
||||
FAIconInfoSign,
|
||||
FAIconScreenshot,
|
||||
FAIconRemoveCircle,
|
||||
FAIconOkCircle,
|
||||
FAIconBanCircle,
|
||||
FAIconArrowLeft,
|
||||
FAIconArrowRight,
|
||||
FAIconArrowUp,
|
||||
FAIconArrowDown,
|
||||
FAIconShareAlt,
|
||||
FAIconResizeFull,
|
||||
FAIconResizeSmall,
|
||||
FAIconPlus,
|
||||
FAIconMinus,
|
||||
FAIconAsterisk,
|
||||
FAIconExclamationSign,
|
||||
FAIconGift,
|
||||
FAIconLeaf,
|
||||
FAIconFire,
|
||||
FAIconEyeOpen,
|
||||
FAIconEyeClose,
|
||||
FAIconWarningSign,
|
||||
FAIconPlane,
|
||||
FAIconCalendar,
|
||||
FAIconRandom,
|
||||
FAIconComment,
|
||||
FAIconMagnet,
|
||||
FAIconChevronUp,
|
||||
FAIconChevronDown,
|
||||
FAIconRetweet,
|
||||
FAIconShoppingCart,
|
||||
FAIconFolderClose,
|
||||
FAIconFolderOpen,
|
||||
FAIconResizeVertical,
|
||||
FAIconResizeHorizontal,
|
||||
FAIconBarChart,
|
||||
FAIconTwitterSign,
|
||||
FAIconFacebookSign,
|
||||
FAIconCameraRetro,
|
||||
FAIconKey,
|
||||
FAIconCogs,
|
||||
FAIconComments,
|
||||
FAIconThumbsUp,
|
||||
FAIconThumbsDown,
|
||||
FAIconStarHalf,
|
||||
FAIconHeartEmpty,
|
||||
FAIconSignout,
|
||||
FAIconLinkedinSign,
|
||||
FAIconPushpin,
|
||||
FAIconExternalLink,
|
||||
FAIconSignin,
|
||||
FAIconTrophy,
|
||||
FAIconGithubSign,
|
||||
FAIconUploadAlt,
|
||||
FAIconLemon,
|
||||
FAIconPhone,
|
||||
FAIconCheckEmpty,
|
||||
FAIconBookmarkEmpty,
|
||||
FAIconPhoneSign,
|
||||
FAIconTwitter,
|
||||
FAIconFacebook,
|
||||
FAIconGithub,
|
||||
FAIconUnlock,
|
||||
FAIconCreditCard,
|
||||
FAIconRss,
|
||||
FAIconHdd,
|
||||
FAIconBullhorn,
|
||||
FAIconBell,
|
||||
FAIconCertificate,
|
||||
FAIconHandRight,
|
||||
FAIconHandLeft,
|
||||
FAIconHandUp,
|
||||
FAIconHandDown,
|
||||
FAIconCircleArrowLeft,
|
||||
FAIconCircleArrowRight,
|
||||
FAIconCircleArrowUp,
|
||||
FAIconCircleArrowDown,
|
||||
FAIconGlobe,
|
||||
FAIconWrench,
|
||||
FAIconTasks,
|
||||
FAIconFilter,
|
||||
FAIconBriefcase,
|
||||
FAIconFullscreen,
|
||||
FAIconGroup,
|
||||
FAIconLink,
|
||||
FAIconCloud,
|
||||
FAIconBeaker,
|
||||
FAIconCut,
|
||||
FAIconCopy,
|
||||
FAIconPaperClip,
|
||||
FAIconSave,
|
||||
FAIconSignBlank,
|
||||
FAIconReorder,
|
||||
FAIconListUl,
|
||||
FAIconListOl,
|
||||
FAIconStrikethrough,
|
||||
FAIconUnderline,
|
||||
FAIconTable,
|
||||
FAIconMagic,
|
||||
FAIconTruck,
|
||||
FAIconPinterest,
|
||||
FAIconPinterestSign,
|
||||
FAIconGooglePlusSign,
|
||||
FAIconGooglePlus,
|
||||
FAIconMoney,
|
||||
FAIconCaretDown,
|
||||
FAIconCaretUp,
|
||||
FAIconCaretLeft,
|
||||
FAIconCaretRight,
|
||||
FAIconColumns,
|
||||
FAIconSort,
|
||||
FAIconSortDown,
|
||||
FAIconSortUp,
|
||||
FAIconEnvelopeAlt,
|
||||
FAIconLinkedin,
|
||||
FAIconUndo,
|
||||
FAIconLegal,
|
||||
FAIconDashboard,
|
||||
FAIconCommentAlt,
|
||||
FAIconCommentsAlt,
|
||||
FAIconBolt,
|
||||
FAIconSitemap,
|
||||
FAIconUmbrella,
|
||||
FAIconPaste,
|
||||
FAIconUserMd
|
||||
} FAIcon;
|
||||
|
||||
|
||||
@interface NSString (FontAwesome)
|
||||
|
||||
+ (NSString *)stringFromAwesomeIcon:(FAIcon)icon;
|
||||
- (NSString *)trimWhitespace;
|
||||
- (BOOL)isEmpty;
|
||||
|
||||
@end
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// NSString+FontAwesome.m
|
||||
//
|
||||
// Created by Pit Garbe on 27.09.12.
|
||||
// Copyright (c) 2012 Pit Garbe. All rights reserved.
|
||||
//
|
||||
// https://github.com/leberwurstsaft/FontAwesome-for-iOS
|
||||
//
|
||||
//
|
||||
// * The Font Awesome font is licensed under the SIL Open Font License
|
||||
// http://scripts.sil.org/OFL
|
||||
//
|
||||
//
|
||||
// * Font Awesome CSS, LESS, and SASS files are licensed under the MIT License
|
||||
// http://opensource.org/licenses/mit-license.html
|
||||
//
|
||||
//
|
||||
// * The Font Awesome pictograms are licensed under the CC BY 3.0 License
|
||||
// http://creativecommons.org/licenses/by/3.0
|
||||
//
|
||||
//
|
||||
// * Attribution is no longer required in Font Awesome 3.0, but much appreciated:
|
||||
// "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
|
||||
//
|
||||
//
|
||||
// -----------------------------------------
|
||||
// Edited and refactored by Jesse Squires on 2 April, 2013.
|
||||
//
|
||||
// http://github.com/jessesquires/BButton
|
||||
//
|
||||
// http://hexedbits.com
|
||||
//
|
||||
|
||||
#import "NSString+FontAwesome.h"
|
||||
|
||||
static const NSArray *awesomeStrings;
|
||||
|
||||
|
||||
@implementation NSString (FontAwesome)
|
||||
|
||||
+ (NSString *)stringFromAwesomeIcon:(FAIcon)icon
|
||||
{
|
||||
if(!awesomeStrings) {
|
||||
awesomeStrings = [NSArray arrayWithObjects:@"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", @"", nil];
|
||||
}
|
||||
|
||||
return [awesomeStrings objectAtIndex:icon];
|
||||
}
|
||||
|
||||
- (NSString *)trimWhitespace
|
||||
{
|
||||
NSMutableString *str = [self mutableCopy];
|
||||
CFStringTrimWhitespace((__bridge CFMutableStringRef)str);
|
||||
return str;
|
||||
}
|
||||
|
||||
- (BOOL)isEmpty
|
||||
{
|
||||
return [[self trimWhitespace] isEqualToString:@""];
|
||||
}
|
||||
|
||||
@end
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// UIButton+Bootstrap.h
|
||||
// UIButton+Bootstrap
|
||||
//
|
||||
// Created by Oskar Groth on 2013-09-29.
|
||||
// Copyright (c) 2013 Oskar Groth. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NSString+FontAwesome.h"
|
||||
@interface UIButton (Bootstrap)
|
||||
- (void)addAwesomeIcon:(FAIcon)icon beforeTitle:(BOOL)before;
|
||||
-(void)bootstrapStyle;
|
||||
-(void)defaultStyle;
|
||||
-(void)primaryStyle;
|
||||
-(void)successStyle;
|
||||
-(void)infoStyle;
|
||||
-(void)warningStyle;
|
||||
-(void)dangerStyle;
|
||||
@end
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// UIButton+Bootstrap.m
|
||||
// UIButton+Bootstrap
|
||||
//
|
||||
// Created by Oskur on 2013-09-29.
|
||||
// Copyright (c) 2013 Oskar Groth. All rights reserved.
|
||||
//
|
||||
#import "UIButton+Bootstrap.h"
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
@implementation UIButton (Bootstrap)
|
||||
|
||||
-(void)bootstrapStyle{
|
||||
self.layer.borderWidth = 1;
|
||||
self.layer.cornerRadius = 4.0;
|
||||
self.layer.masksToBounds = YES;
|
||||
[self setAdjustsImageWhenHighlighted:NO];
|
||||
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[self.titleLabel setFont:[UIFont fontWithName:@"FontAwesome" size:self.titleLabel.font.pointSize]];
|
||||
}
|
||||
|
||||
-(void)defaultStyle{
|
||||
[self bootstrapStyle];
|
||||
[self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
|
||||
[self setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted];
|
||||
self.backgroundColor = [UIColor whiteColor];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:204/255.0 green:204/255.0 blue:204/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:235/255.0 green:235/255.0 blue:235/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
-(void)primaryStyle{
|
||||
[self bootstrapStyle];
|
||||
self.backgroundColor = [UIColor colorWithRed:66/255.0 green:139/255.0 blue:202/255.0 alpha:1];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:53/255.0 green:126/255.0 blue:189/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:51/255.0 green:119/255.0 blue:172/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
-(void)successStyle{
|
||||
[self bootstrapStyle];
|
||||
self.backgroundColor = [UIColor colorWithRed:92/255.0 green:184/255.0 blue:92/255.0 alpha:1];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:76/255.0 green:174/255.0 blue:76/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:69/255.0 green:164/255.0 blue:84/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
-(void)infoStyle{
|
||||
[self bootstrapStyle];
|
||||
self.backgroundColor = [UIColor colorWithRed:91/255.0 green:192/255.0 blue:222/255.0 alpha:1];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:70/255.0 green:184/255.0 blue:218/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:57/255.0 green:180/255.0 blue:211/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
-(void)warningStyle{
|
||||
[self bootstrapStyle];
|
||||
self.backgroundColor = [UIColor colorWithRed:240/255.0 green:173/255.0 blue:78/255.0 alpha:1];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:238/255.0 green:162/255.0 blue:54/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:237/255.0 green:155/255.0 blue:67/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
-(void)dangerStyle{
|
||||
[self bootstrapStyle];
|
||||
self.backgroundColor = [UIColor colorWithRed:217/255.0 green:83/255.0 blue:79/255.0 alpha:1];
|
||||
self.layer.borderColor = [[UIColor colorWithRed:212/255.0 green:63/255.0 blue:58/255.0 alpha:1] CGColor];
|
||||
[self setBackgroundImage:[self buttonImageFromColor:[UIColor colorWithRed:210/255.0 green:48/255.0 blue:51/255.0 alpha:1]] forState:UIControlStateHighlighted];
|
||||
}
|
||||
|
||||
- (void)addAwesomeIcon:(FAIcon)icon beforeTitle:(BOOL)before
|
||||
{
|
||||
NSString *iconString = [NSString stringFromAwesomeIcon:icon];
|
||||
self.titleLabel.font = [UIFont fontWithName:@"FontAwesome"
|
||||
size:self.titleLabel.font.pointSize];
|
||||
|
||||
NSString *title = [NSString stringWithFormat:@"%@", iconString];
|
||||
|
||||
if(self.titleLabel.text) {
|
||||
if(before)
|
||||
title = [title stringByAppendingFormat:@" %@", self.titleLabel.text];
|
||||
else
|
||||
title = [NSString stringWithFormat:@"%@ %@", self.titleLabel.text, iconString];
|
||||
}
|
||||
|
||||
[self setTitle:title forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (UIImage *) buttonImageFromColor:(UIColor *)color {
|
||||
CGRect rect = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
|
||||
UIGraphicsBeginImageContext(rect.size);
|
||||
CGContextRef context = UIGraphicsGetCurrentContext();
|
||||
CGContextSetFillColorWithColor(context, [color CGColor]);
|
||||
CGContextFillRect(context, rect);
|
||||
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsEndImageContext();
|
||||
return img;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -69,7 +69,7 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<view alpha="0.29999999999999999" contentMode="scaleToFill" restorationIdentifier="FundListCell" id="rlA-Zw-HRE">
|
||||
<rect key="frame" x="0.0" y="106" width="320" height="1"/>
|
||||
<rect key="frame" x="0.0" y="107" width="320" height="1"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
|
||||
|
||||
@@ -60,8 +60,13 @@
|
||||
[tableView registerNib:nib forCellReuseIdentifier:loanListCell];
|
||||
cell = (FundListCell *)[tableView dequeueReusableCellWithIdentifier:loanListCell];
|
||||
}
|
||||
cell.selectedBackgroundView = [ManagerUtil selectBackgroudViewWithFrame:CGRectMake(0, 0, 320, [self tableView:tableView heightForRowAtIndexPath:indexPath])];
|
||||
return cell;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
[_tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
[self.tableView setUserInteractionEnabled:YES];
|
||||
self.tableView.allowsSelection = YES;
|
||||
[self.tableView addHeaderWithTarget:self action:@selector(headerRereshing)];
|
||||
[self.tableView addFooterWithTarget:self action:@selector(footerRereshing)];
|
||||
|
||||
|
||||
@@ -90,6 +90,6 @@
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="fund_cell_label_bg_blue.png" width="38" height="40"/>
|
||||
<image name="pie_chart_center.png" width="235" height="235"/>
|
||||
<image name="pie_chart_center.png" width="117" height="117"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -30,6 +30,7 @@
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self headerBeginRefreshing];
|
||||
|
||||
}
|
||||
#pragma mark MJRefreshDelegate
|
||||
-(void)headerRereshing
|
||||
@@ -58,18 +59,23 @@
|
||||
{
|
||||
static NSString *loanListCell = @"LoanListCell";
|
||||
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:loanListCell];
|
||||
if (cell == nil) {
|
||||
if (cell == nil) {
|
||||
UINib *nib = [UINib nibWithNibName:@"LoanListCell" bundle:nil];
|
||||
[tableView registerNib:nib forCellReuseIdentifier:loanListCell];
|
||||
cell = (LoanListCell *)[tableView dequeueReusableCellWithIdentifier:loanListCell];
|
||||
|
||||
}
|
||||
[cell setSelectionStyle:UITableViewCellSelectionStyleDefault];
|
||||
[(LoanListCell*)cell setPercent:40];
|
||||
NSString* htmlStr = @"<span style=\"text-align:center; color:green;\">限</span>12个月";
|
||||
[(LoanListCell*)cell setTimeWithString:htmlStr];
|
||||
cell.selectedBackgroundView = [ManagerUtil selectBackgroudViewWithFrame:CGRectMake(0, 0, 320, [self tableView:tableView heightForRowAtIndexPath:indexPath])];
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
@@ -63,9 +63,14 @@
|
||||
|
||||
}
|
||||
[((FundListCell*)cell).totalLabel setText:@"已经有6783234人"];
|
||||
cell.selectedBackgroundView = [ManagerUtil selectBackgroudViewWithFrame:CGRectMake(0, 0, 320, [self tableView:tableView heightForRowAtIndexPath:indexPath])];
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
_attentionBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
|
||||
_suggestBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
|
||||
_markBtn.titleLabel.font = [UIFont systemFontOfSize:14.0];
|
||||
[_friendBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:_friendBtn.frame] forState:UIControlStateHighlighted];
|
||||
[_attentionBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:_attentionBtn.frame] forState:UIControlStateHighlighted];
|
||||
[_suggestBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:_suggestBtn.frame] forState:UIControlStateHighlighted];
|
||||
[_markBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:_markBtn.frame] forState:UIControlStateHighlighted];
|
||||
}
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CAT-ff-GbD">
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CAT-ff-GbD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="141" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title=" 转发好友" image="more_icon_3.png">
|
||||
@@ -41,7 +41,7 @@
|
||||
<action selector="friendBtnClick:" destination="3ia-yn-XPM" eventType="touchUpInside" id="1fY-fN-TVc"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m2I-DT-aQk">
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="m2I-DT-aQk">
|
||||
<rect key="frame" x="140" y="0.0" width="141" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title=" 关注按钮" image="more_icon_4.png">
|
||||
@@ -52,7 +52,7 @@
|
||||
<action selector="attentionBtnClick:" destination="3ia-yn-XPM" eventType="touchUpInside" id="0Q0-pH-zIZ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h0O-hW-S1X">
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="h0O-hW-S1X">
|
||||
<rect key="frame" x="0.0" y="59" width="141" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title=" 意见按钮" image="more_icon_6.png">
|
||||
@@ -63,7 +63,7 @@
|
||||
<action selector="suggestBtnClick:" destination="3ia-yn-XPM" eventType="touchUpInside" id="V0L-9L-hTU"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U7Y-c6-uPb">
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U7Y-c6-uPb">
|
||||
<rect key="frame" x="140" y="60" width="141" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title=" 评分按钮" image="more_icon_5.png">
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "MyTotalProfitCellView.h"
|
||||
|
||||
@implementation MyTotalProfitCellView
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
@@ -70,7 +69,29 @@
|
||||
[_profitMoneyLabel setFont:[UIFont systemFontOfSize:25.0]];
|
||||
_profitMoneyLabel.text = @"0.0";
|
||||
[self addSubview:_profitMoneyLabel];
|
||||
|
||||
//左边按钮。
|
||||
UIButton* leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
leftBtn.backgroundColor = [UIColor clearColor];
|
||||
leftBtn.frame = CGRectMake(0, 0, size.width/2, size.height);
|
||||
[leftBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:leftBtn.frame] forState:UIControlStateHighlighted];
|
||||
[leftBtn addTarget:self action:@selector(leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:leftBtn];
|
||||
//左边按钮。
|
||||
UIButton* rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
rightBtn.backgroundColor = [UIColor clearColor];
|
||||
rightBtn.frame = CGRectMake(size.width/2, 0, size.width/2, size.height);
|
||||
[rightBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:rightBtn.frame] forState:UIControlStateHighlighted];
|
||||
[rightBtn addTarget:self action:@selector(leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:rightBtn];
|
||||
}
|
||||
|
||||
|
||||
-(void)leftBtnClick:(id)sender
|
||||
{
|
||||
[MBProgressHUD checkHudWithView:self label:@"点我没用" hidesAfter:1.0];
|
||||
}
|
||||
-(void)rightBtnClick:(id)sender
|
||||
{
|
||||
[MBProgressHUD checkHudWithView:self label:@"点我没用" hidesAfter:1.0];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
[ManagerUtil SetSubViewExternNone:self];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.allowsSelection = YES;
|
||||
// _tableView.separatorStyle = UITableViewCellSelectionStyleNone;
|
||||
// [_tableView style] = UITableViewStyleGrouped;
|
||||
|
||||
@@ -170,8 +171,10 @@
|
||||
logoutBtn.frame = CGRectMake(0, 0, 280, 44);
|
||||
[logoutBtn setTitle:@"点我你就赢了" forState:UIControlStateNormal];
|
||||
[logoutBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
[logoutBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
|
||||
logoutBtn.backgroundColor = [UIColor colorWithRed:200.0 green:0.0 blue:0.0 alpha:1.0];
|
||||
[logoutBtn.layer setCornerRadius:0.0]; //设置矩形四个圆角半径
|
||||
[logoutBtn setBackgroundImage:[ManagerUtil buttonImageFromColor:Touch_BackGroudColor withFrame:logoutBtn.frame] forState:UIControlStateHighlighted];
|
||||
[logoutBtn.layer setCornerRadius:5.0]; //设置矩形四个圆角半径
|
||||
[cell addSubview:logoutBtn];
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
@@ -179,9 +182,18 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
UIView* selectedBackgroudView = [ManagerUtil selectBackgroudViewWithFrame:CGRectMake(0, 0, 320, [self tableView:tableView heightForRowAtIndexPath:indexPath])];
|
||||
CGFloat cellHeight = [self tableView:tableView heightForRowAtIndexPath:indexPath];
|
||||
[selectedBackgroudView addSubview:[ManagerUtil lineWithColor:[UIColor grayColor] withAlpha:0.3 withFrame:CGRectMake(0, 0, 1, cellHeight) ]];
|
||||
[selectedBackgroudView addSubview:[ManagerUtil lineWithColor:[UIColor grayColor] withAlpha:0.3 withFrame:CGRectMake(tableView.frame.size.width-1, 0, 1, cellHeight)]];
|
||||
cell.selectedBackgroundView = selectedBackgroudView;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.allowsSelection = YES;
|
||||
[_tableView addHeaderWithTarget:self action:@selector(headerRereshing)];
|
||||
|
||||
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
|
||||
}
|
||||
#pragma mark MJRefreshDelegate
|
||||
@@ -168,10 +168,13 @@
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
cell.selectedBackgroundView = [ManagerUtil selectBackgroudViewWithFrame:CGRectMake(0, 0, 320, [self tableView:tableView heightForRowAtIndexPath:indexPath])];
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:NO];
|
||||
}
|
||||
#pragma mark - UIBarButtonClick 导航条两边按钮
|
||||
-(void)leftBarBtnClick:(id)sender
|
||||
{
|
||||
|
||||
@@ -19,4 +19,5 @@
|
||||
#import "STableViewController.h"
|
||||
#import "MBProgressHUD.h"
|
||||
#import "ManagerUtil.h"
|
||||
#import "MBProgressHUD+Util.h"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user