diff --git a/Ash_AWord.xcodeproj/project.pbxproj b/Ash_AWord.xcodeproj/project.pbxproj index 0599373..618006a 100644 --- a/Ash_AWord.xcodeproj/project.pbxproj +++ b/Ash_AWord.xcodeproj/project.pbxproj @@ -47,6 +47,8 @@ A93442001ACA919F00A6B233 /* tabbarVoiceClick@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A93441FD1ACA919F00A6B233 /* tabbarVoiceClick@2x.png */; }; A93442031ACA981D00A6B233 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A93442011ACA981D00A6B233 /* Default-568h@2x.png */; }; A93442041ACA981D00A6B233 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A93442021ACA981D00A6B233 /* Default@2x.png */; }; + A94691CD1B26EACE00B5D26B /* PersonalInfoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A94691CB1B26EACE00B5D26B /* PersonalInfoViewController.xib */; }; + A94691CE1B26EACE00B5D26B /* PersonalInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A94691CC1B26EACE00B5D26B /* PersonalInfoViewController.m */; }; A94D0EDD1AD5757A0002DEB1 /* UpdateViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A94D0EDC1AD5757A0002DEB1 /* UpdateViewModel.m */; }; A94DF6351AD4D94E00DCDCB0 /* MyNoteViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A94DF6331AD4D94E00DCDCB0 /* MyNoteViewController.m */; }; A94DF6361AD4D94E00DCDCB0 /* MyNoteViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A94DF6341AD4D94E00DCDCB0 /* MyNoteViewController.xib */; }; @@ -192,6 +194,12 @@ A99AA12C1ADCCB3C00574B12 /* MessagePublihViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A99AA1291ADCCB3C00574B12 /* MessagePublihViewModel.m */; }; A99AA12D1ADCCB3C00574B12 /* MessageViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A99AA12B1ADCCB3C00574B12 /* MessageViewModel.m */; }; A99AA12F1ADD028400574B12 /* Icon120.png in Resources */ = {isa = PBXBuildFile; fileRef = A99AA12E1ADD028400574B12 /* Icon120.png */; }; + A9A3A74E1B2805DA001AAB3A /* PersonalTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A3A74D1B2805DA001AAB3A /* PersonalTopView.m */; }; + A9A3A7501B2805EA001AAB3A /* PersonalTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9A3A74F1B2805EA001AAB3A /* PersonalTopView.xib */; }; + A9A3A7521B2810DB001AAB3A /* Pofile_coverImage@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A9A3A7511B2810DB001AAB3A /* Pofile_coverImage@2x.jpg */; }; + A9A3A7541B281178001AAB3A /* PersonalTopBg@2x.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A9A3A7531B281178001AAB3A /* PersonalTopBg@2x.jpg */; }; + A9A3A7591B281392001AAB3A /* CExpandHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A3A7571B281392001AAB3A /* CExpandHeader.m */; }; + A9A3A75A1B281392001AAB3A /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = A9A3A7581B281392001AAB3A /* image.png */; }; A9B4A9541AEDC3620017C655 /* FeedbackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9B4A9521AEDC3620017C655 /* FeedbackViewController.m */; }; A9B4A9551AEDC3620017C655 /* FeedbackViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A9B4A9531AEDC3620017C655 /* FeedbackViewController.xib */; }; A9B4E39F1AC9908E00A1DBDF /* libMobClickLibrary.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9B4E39C1AC9908E00A1DBDF /* libMobClickLibrary.a */; }; @@ -278,6 +286,9 @@ A93441FD1ACA919F00A6B233 /* tabbarVoiceClick@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "tabbarVoiceClick@2x.png"; sourceTree = ""; }; A93442011ACA981D00A6B233 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; A93442021ACA981D00A6B233 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + A94691CA1B26EACE00B5D26B /* PersonalInfoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersonalInfoViewController.h; sourceTree = ""; }; + A94691CB1B26EACE00B5D26B /* PersonalInfoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PersonalInfoViewController.xib; sourceTree = ""; }; + A94691CC1B26EACE00B5D26B /* PersonalInfoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersonalInfoViewController.m; sourceTree = ""; }; A94D0EDB1AD5757A0002DEB1 /* UpdateViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UpdateViewModel.h; sourceTree = ""; }; A94D0EDC1AD5757A0002DEB1 /* UpdateViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UpdateViewModel.m; sourceTree = ""; }; A94DF6321AD4D94E00DCDCB0 /* MyNoteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyNoteViewController.h; sourceTree = ""; }; @@ -518,6 +529,14 @@ A99AA12A1ADCCB3C00574B12 /* MessageViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MessageViewModel.h; sourceTree = ""; }; A99AA12B1ADCCB3C00574B12 /* MessageViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MessageViewModel.m; sourceTree = ""; }; A99AA12E1ADD028400574B12 /* Icon120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon120.png; sourceTree = ""; }; + A9A3A74C1B2805DA001AAB3A /* PersonalTopView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PersonalTopView.h; sourceTree = ""; }; + A9A3A74D1B2805DA001AAB3A /* PersonalTopView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PersonalTopView.m; sourceTree = ""; }; + A9A3A74F1B2805EA001AAB3A /* PersonalTopView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PersonalTopView.xib; sourceTree = ""; }; + A9A3A7511B2810DB001AAB3A /* Pofile_coverImage@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "Pofile_coverImage@2x.jpg"; sourceTree = ""; }; + A9A3A7531B281178001AAB3A /* PersonalTopBg@2x.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "PersonalTopBg@2x.jpg"; sourceTree = ""; }; + A9A3A7561B281392001AAB3A /* CExpandHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CExpandHeader.h; sourceTree = ""; }; + A9A3A7571B281392001AAB3A /* CExpandHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CExpandHeader.m; sourceTree = ""; }; + A9A3A7581B281392001AAB3A /* image.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = image.png; sourceTree = ""; }; A9B4A9511AEDC3620017C655 /* FeedbackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FeedbackViewController.h; sourceTree = ""; }; A9B4A9521AEDC3620017C655 /* FeedbackViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FeedbackViewController.m; sourceTree = ""; }; A9B4A9531AEDC3620017C655 /* FeedbackViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FeedbackViewController.xib; sourceTree = ""; }; @@ -686,6 +705,9 @@ A9617A501ACC274C0024AE4A /* My */ = { isa = PBXGroup; children = ( + A94691CA1B26EACE00B5D26B /* PersonalInfoViewController.h */, + A94691CC1B26EACE00B5D26B /* PersonalInfoViewController.m */, + A94691CB1B26EACE00B5D26B /* PersonalInfoViewController.xib */, A9617A511ACC27860024AE4A /* SetUpViewController.h */, A9617A521ACC27860024AE4A /* SetUpViewController.m */, A9617A531ACC27860024AE4A /* SetUpViewController.xib */, @@ -813,6 +835,9 @@ A96F27F11B21C5AC00DA0A66 /* PraiseUserListTableViewCell.h */, A96F27F21B21C5AC00DA0A66 /* PraiseUserListTableViewCell.m */, A96F27F31B21C5AC00DA0A66 /* PraiseUserListTableViewCell.xib */, + A9A3A74C1B2805DA001AAB3A /* PersonalTopView.h */, + A9A3A74D1B2805DA001AAB3A /* PersonalTopView.m */, + A9A3A74F1B2805EA001AAB3A /* PersonalTopView.xib */, ); path = User; sourceTree = ""; @@ -985,6 +1010,7 @@ A97C54D91AC9014D0038818A /* Vender */ = { isa = PBXGroup; children = ( + A9A3A7551B281392001AAB3A /* CExpandHeader */, A9754A0D1ADC080E0018BAAD /* AudioPlayer */, A96862511ACCF13300DDAA6B /* PSTCollectionView */, A968624D1ACCF12300DDAA6B /* DACircularProgress */, @@ -1023,6 +1049,8 @@ A97C54E21AC91FD70038818A /* Resource */ = { isa = PBXGroup; children = ( + A9A3A7531B281178001AAB3A /* PersonalTopBg@2x.jpg */, + A9A3A7511B2810DB001AAB3A /* Pofile_coverImage@2x.jpg */, A9B6DFE51B2033A80003C1BC /* toolbar_light_comment@2x.png */, A9B6DFE31B202E950003C1BC /* night_user_comment_circle@2x.png */, A9B6DFDF1B202E7D0003C1BC /* comment_support_fake@2x.png */, @@ -1249,6 +1277,16 @@ path = Message; sourceTree = ""; }; + A9A3A7551B281392001AAB3A /* CExpandHeader */ = { + isa = PBXGroup; + children = ( + A9A3A7561B281392001AAB3A /* CExpandHeader.h */, + A9A3A7571B281392001AAB3A /* CExpandHeader.m */, + A9A3A7581B281392001AAB3A /* image.png */, + ); + path = CExpandHeader; + sourceTree = ""; + }; A9B4E39B1AC9908E00A1DBDF /* UMAnalytics_Sdk_3.4.6 */ = { isa = PBXGroup; children = ( @@ -1415,6 +1453,7 @@ A97559A51ACB9748004ADA42 /* setup-head-default@2x.png in Resources */, A97DBE3F1ACAE29E00705682 /* Icon.png in Resources */, A98536871AEBDA1E000312BF /* OurLoginViewController.xib in Resources */, + A9A3A75A1B281392001AAB3A /* image.png in Resources */, A9754A271ADC199B0018BAAD /* MyMessageViewController.xib in Resources */, A94DF6361AD4D94E00DCDCB0 /* MyNoteViewController.xib in Resources */, A9E2711C1ADB97ED000B1542 /* Default.png in Resources */, @@ -1422,6 +1461,7 @@ A97559CF1ACBF0BC004ADA42 /* btn_good@2x.png in Resources */, A97559CC1ACBF0BC004ADA42 /* btn_bad_clicked@2x.png in Resources */, A97DBE461ACAE7B500705682 /* iconWeixin@2x.png in Resources */, + A94691CD1B26EACE00B5D26B /* PersonalInfoViewController.xib in Resources */, A96862421ACCF0B400DDAA6B /* LICENCE.txt in Resources */, A985367D1AEB8F89000312BF /* RegistInfoViewController.xib in Resources */, A9CF21281B1C53E3007490EF /* CommentGoodListCellTableViewCell.xib in Resources */, @@ -1452,6 +1492,7 @@ A97DBE441ACAE61400705682 /* first-login-qq@2x.png in Resources */, A9B6DFDC1B2023730003C1BC /* recommend_refreshtip_close@2x.png in Resources */, A9FAD42D1AC923E2007ADC10 /* MessageViewController.xib in Resources */, + A9A3A7541B281178001AAB3A /* PersonalTopBg@2x.jpg in Resources */, A9B6DFE41B202E950003C1BC /* night_user_comment_circle@2x.png in Resources */, A9B4A9551AEDC3620017C655 /* FeedbackViewController.xib in Resources */, A98F986C1ACA2FA9007C4594 /* BaseRefreshViewController.xib in Resources */, @@ -1488,6 +1529,7 @@ A93441F71ACA918100A6B233 /* tabbarSetup@2x.png in Resources */, A9B6DFDE1B2028B80003C1BC /* share_cancel@2x.png in Resources */, A90BA0091AD6060600728393 /* playButtonClick@2x.png in Resources */, + A9A3A7501B2805EA001AAB3A /* PersonalTopView.xib in Resources */, A9FD82BD1B1D544300AC4DC9 /* CommentTableViewCell.xib in Resources */, A98536731AEB66F9000312BF /* ReportViewController.xib in Resources */, A97C55011AC933AD0038818A /* UMSCommentInputController.xib in Resources */, @@ -1517,6 +1559,7 @@ A97DBE341ACAE10800705682 /* LoginViewController.xib in Resources */, A93441EA1ACA8AD200A6B233 /* Profile_filter_ImageIconClick@2x.png in Resources */, A97C55021AC933AD0038818A /* UMSCommentInputControlleriPad.xib in Resources */, + A9A3A7521B2810DB001AAB3A /* Pofile_coverImage@2x.jpg in Resources */, A93441F11ACA916D00A6B233 /* tabbarQuotation@2x.png in Resources */, A90BA00D1AD6062300728393 /* repeatVideoStarticon@2x.png in Resources */, ); @@ -1603,6 +1646,7 @@ A97C54CD1AC8F10F0038818A /* BaseViewModel.m in Sources */, A9754A261ADC199B0018BAAD /* MyMessageViewController.m in Sources */, A9617A4F1ACC0D0F0024AE4A /* NoteViewModel.m in Sources */, + A94691CE1B26EACE00B5D26B /* PersonalInfoViewController.m in Sources */, A96862461ACCF0B400DDAA6B /* MWPhoto.m in Sources */, A96F27F41B21C5AC00DA0A66 /* PraiseUserListTableViewCell.m in Sources */, A968624A1ACCF0B400DDAA6B /* MWZoomingScrollView.m in Sources */, @@ -1634,11 +1678,13 @@ A99AA12D1ADCCB3C00574B12 /* MessageViewModel.m in Sources */, A968626F1ACCF13300DDAA6B /* PSTCollectionView.m in Sources */, A9FAD4351AC925AC007ADC10 /* LoginViewModel.m in Sources */, + A9A3A7591B281392001AAB3A /* CExpandHeader.m in Sources */, A98536861AEBDA1E000312BF /* OurLoginViewController.m in Sources */, A95510921AC39E6A0006D16F /* main.m in Sources */, A95CE2EB1B1DFD030017AE68 /* NoteCommentViewModel.m in Sources */, A98D659D1AD37F18008668EE /* MessageTableViewCell.m in Sources */, A96862711ACCF13300DDAA6B /* PSTCollectionViewController.m in Sources */, + A9A3A74E1B2805DA001AAB3A /* PersonalTopView.m in Sources */, A96862431ACCF0B400DDAA6B /* MWCaptionView.m in Sources */, A9FD82BC1B1D544300AC4DC9 /* CommentTableViewCell.m in Sources */, A9B6DFCC1B1FFDB20003C1BC /* CommentTextView.m in Sources */, diff --git a/Ash_AWord.xcworkspace/xcuserdata/xmfish.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Ash_AWord.xcworkspace/xcuserdata/xmfish.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 7c79c8d..76dc9cc 100644 --- a/Ash_AWord.xcworkspace/xcuserdata/xmfish.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/Ash_AWord.xcworkspace/xcuserdata/xmfish.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -649,11 +649,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Ash_AWord/Views/Note/NoteTableViewCell.m" - timestampString = "455187738.062961" + timestampString = "455535412.426096" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "168" - endingLineNumber = "168" + startingLineNumber = "169" + endingLineNumber = "169" landmarkName = "-setText_Image:" landmarkType = "5"> @@ -1561,11 +1561,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "Ash_AWord/Views/Note/NoteTableViewCell.m" - timestampString = "455187738.062961" + timestampString = "455535412.426096" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "179" - endingLineNumber = "179" + startingLineNumber = "180" + endingLineNumber = "180" landmarkName = "-canPerformAction:withSender:" landmarkType = "5"> diff --git a/Ash_AWord/Resource/PersonalTopBg@2x.jpg b/Ash_AWord/Resource/PersonalTopBg@2x.jpg new file mode 100644 index 0000000..59660da Binary files /dev/null and b/Ash_AWord/Resource/PersonalTopBg@2x.jpg differ diff --git a/Ash_AWord/Resource/Pofile_coverImage@2x.jpg b/Ash_AWord/Resource/Pofile_coverImage@2x.jpg new file mode 100644 index 0000000..88bbc86 Binary files /dev/null and b/Ash_AWord/Resource/Pofile_coverImage@2x.jpg differ diff --git a/Ash_AWord/Vender/CExpandHeader/CExpandHeader.h b/Ash_AWord/Vender/CExpandHeader/CExpandHeader.h new file mode 100755 index 0000000..f84b891 --- /dev/null +++ b/Ash_AWord/Vender/CExpandHeader/CExpandHeader.h @@ -0,0 +1,46 @@ +// +// CExpandHeader.h +// CExpandHeaderViewExample +// +// +// Created by cml on 14-8-27. +// Copyright (c) 2014年 Mei_L. All rights reserved. +// + +#import + +@interface CExpandHeader : NSObject + +#pragma mark - 类方法 +/** + * 生成一个CExpandHeader实例 + * + * @param scrollView + * @param expandView 可以伸展的背景View + * + * @return CExpandHeader 对象 + */ ++ (id)expandWithScrollView:(UIScrollView*)scrollView expandView:(UIView*)expandView; + + +#pragma mark - 成员方法 +/** + * + * + * @param scrollView + * @param expandView + */ +- (void)expandWithScrollView:(UIScrollView*)scrollView expandView:(UIView*)expandView; + +/** + * 监听scrollViewDidScroll方法 + * + * @param scrollView + */ +- (void)scrollViewDidScroll:(UIScrollView*)scrollView; + +@end + +// 版权属于原作者 +// http://code4app.com (cn) http://code4app.net (en) +// 发布代码于最专业的源码分享网站: Code4App.com diff --git a/Ash_AWord/Vender/CExpandHeader/CExpandHeader.m b/Ash_AWord/Vender/CExpandHeader/CExpandHeader.m new file mode 100755 index 0000000..a881984 --- /dev/null +++ b/Ash_AWord/Vender/CExpandHeader/CExpandHeader.m @@ -0,0 +1,86 @@ +// +// CExpandHeader.m +// CExpandHeaderViewExample +// +// Created by cml on 14-8-27. +// Copyright (c) 2014年 Mei_L. All rights reserved. +// + +#define CExpandContentOffset @"contentOffset" + +#import "CExpandHeader.h" + +@implementation CExpandHeader{ + __weak UIScrollView *_scrollView; //scrollView或者其子类 + __weak UIView *_expandView; //背景可以伸展的View + + CGFloat _expandHeight; +} + +- (void)dealloc{ + if (_scrollView) { + [_scrollView removeObserver:self forKeyPath:CExpandContentOffset]; + _scrollView = nil; + } + _expandView = nil; +} + ++ (id)expandWithScrollView:(UIScrollView*)scrollView expandView:(UIView*)expandView{ + CExpandHeader *expandHeader = [CExpandHeader new]; + [expandHeader expandWithScrollView:scrollView expandView:expandView]; + return expandHeader; +} + +- (void)expandWithScrollView:(UIScrollView*)scrollView expandView:(UIView*)expandView{ + + + _expandHeight = CGRectGetHeight(expandView.frame); + + _scrollView = scrollView; + _scrollView.contentInset = UIEdgeInsetsMake(_expandHeight, 0, 0, 0); + [_scrollView insertSubview:expandView atIndex:0]; + [_scrollView addObserver:self forKeyPath:CExpandContentOffset options:NSKeyValueObservingOptionNew context:nil]; + [_scrollView setContentOffset:CGPointMake(0, -180)]; + + _expandView = expandView; + + //使View可以伸展效果 重要属性 + _expandView.contentMode= UIViewContentModeScaleAspectFill; + _expandView.clipsToBounds = YES; + + [self reSizeView]; + +} + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ + if (![keyPath isEqualToString:CExpandContentOffset]) { + return; + } + [self scrollViewDidScroll:_scrollView]; +} + +- (void)scrollViewDidScroll:(UIScrollView*)scrollView +{ + + CGFloat offsetY = scrollView.contentOffset.y; + if(offsetY < _expandHeight * -1) { + CGRect currentFrame = _expandView.frame; + currentFrame.origin.y = offsetY; + currentFrame.size.height = -1*offsetY; + _expandView.frame = currentFrame; + } + +} + +- (void)reSizeView{ + + //重置_expandView位置 + [_expandView setFrame:CGRectMake(0, -1*_expandHeight, CGRectGetWidth(_expandView.frame), _expandHeight)]; + +} + +@end + +// 版权属于原作者 +// http://code4app.com (cn) http://code4app.net (en) +// 发布代码于最专业的源码分享网站: Code4App.com diff --git a/Ash_AWord/Vender/CExpandHeader/image.png b/Ash_AWord/Vender/CExpandHeader/image.png new file mode 100755 index 0000000..883f224 Binary files /dev/null and b/Ash_AWord/Vender/CExpandHeader/image.png differ diff --git a/Ash_AWord/ViewControllers/Login/LoginViewController.xib b/Ash_AWord/ViewControllers/Login/LoginViewController.xib index 1f33ebe..62a7efe 100644 --- a/Ash_AWord/ViewControllers/Login/LoginViewController.xib +++ b/Ash_AWord/ViewControllers/Login/LoginViewController.xib @@ -1,8 +1,8 @@ - + - + diff --git a/Ash_AWord/ViewControllers/My/PersonalInfoViewController.h b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.h new file mode 100644 index 0000000..b529fe0 --- /dev/null +++ b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.h @@ -0,0 +1,18 @@ +// +// PersonalInfoViewController.h +// Ash_AWord +// +// Created by xmfish on 15/6/9. +// Copyright (c) 2015年 ash. All rights reserved. +// + +#import "ViewController.h" +#import "BaseRefreshViewController.h" +@interface PersonalInfoViewController : BaseRefreshViewController +@property (weak, nonatomic) IBOutlet UITableView *tableView; +@property (weak, nonatomic) IBOutlet UIImageView *topViewImage; +- (IBAction)chatBtnClick:(id)sender; +@property (weak, nonatomic) IBOutlet UIView *lineView; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *lineHeight; + +@end diff --git a/Ash_AWord/ViewControllers/My/PersonalInfoViewController.m b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.m new file mode 100644 index 0000000..4b73a1d --- /dev/null +++ b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.m @@ -0,0 +1,68 @@ +// +// PersonalInfoViewController.m +// Ash_AWord +// +// Created by xmfish on 15/6/9. +// Copyright (c) 2015年 ash. All rights reserved. +// + +#import "PersonalInfoViewController.h" +#import "CExpandHeader.h" +#import "PersonalTopView.h" + + + +@interface PersonalInfoViewController () +{ + CExpandHeader *_header; + PersonalTopView* _personalTopView; +} +@end + +@implementation PersonalInfoViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. + + [self.tableView removeHeader]; + _personalTopView = [Ash_UIUtil instanceXibView:@"PersonalTopView"]; + [self.tableView setTableHeaderView:_personalTopView]; + +} +- (void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; + +} + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView{ + CGFloat yOffset = scrollView.contentOffset.y; + if (yOffset <= 0) { + CGRect f = _topViewImage.frame; + f.origin.y = -80 - yOffset*0.8; + _topViewImage.frame = f; + }else{ + CGRect f = _topViewImage.frame; + f.origin.y = -80 - yOffset*0.8; + _topViewImage.frame = f; + } +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +- (IBAction)chatBtnClick:(id)sender { +} +@end diff --git a/Ash_AWord/ViewControllers/My/PersonalInfoViewController.xib b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.xib new file mode 100644 index 0000000..ddd462d --- /dev/null +++ b/Ash_AWord/ViewControllers/My/PersonalInfoViewController.xib @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ash_AWord/Views/Note/NoteTableViewCell.m b/Ash_AWord/Views/Note/NoteTableViewCell.m index 7636340..3d73e6a 100644 --- a/Ash_AWord/Views/Note/NoteTableViewCell.m +++ b/Ash_AWord/Views/Note/NoteTableViewCell.m @@ -13,6 +13,7 @@ #import "SetUpViewController.h" #import "MyNoteViewController.h" #import "NoteCommentViewController.h" +#import "PersonalInfoViewController.h" @interface NoteTableViewCell() @end @implementation NoteTableViewCell @@ -199,6 +200,11 @@ return imageHeight+labelRect.size.height+95; } - (IBAction)avatarBtnClick:(id)sender { + + PersonalInfoViewController* personalInfoViewController = [[PersonalInfoViewController alloc] init]; + personalInfoViewController.hidesBottomBarWhenPushed = YES; + [[AppDelegate visibleViewController].navigationController pushViewController:personalInfoViewController animated:YES]; + return; if (![_text_image.ownerId isEqualToString:[AWordUser sharedInstance].uid] ) { MyNoteViewController* myNoteViewController = [[MyNoteViewController alloc] init]; myNoteViewController.otherUserId = _text_image.ownerId; diff --git a/Ash_AWord/Views/User/PersonalTopView.h b/Ash_AWord/Views/User/PersonalTopView.h new file mode 100644 index 0000000..43b717e --- /dev/null +++ b/Ash_AWord/Views/User/PersonalTopView.h @@ -0,0 +1,32 @@ +// +// PersonalTopView.h +// Ash_AWord +// +// Created by xmfish on 15/6/10. +// Copyright (c) 2015年 ash. All rights reserved. +// + +#import + +@interface PersonalTopView : UIView +@property (weak, nonatomic) IBOutlet UILabel *nameLabel; +@property (weak, nonatomic) IBOutlet UIButton *avatarBtn; +- (IBAction)avatarBtnClick:(id)sender; +@property (weak, nonatomic) IBOutlet UILabel *signatureLabel; +- (IBAction)voiceBtnClick:(id)sender; +@property (weak, nonatomic) IBOutlet UIButton *voiceBtn; +- (IBAction)imageBtnClick:(id)sender; +@property (weak, nonatomic) IBOutlet UIButton *imageBtn; +@property (weak, nonatomic) IBOutlet UILabel *fansCountLabel; +@property (weak, nonatomic) IBOutlet UILabel *attentionCountLabel; +@property (weak, nonatomic) IBOutlet UIView *line1; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *line1Width; +@property (weak, nonatomic) IBOutlet UIView *line2; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *line3Height; +@property (weak, nonatomic) IBOutlet UIView *line3; +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *line2Width; +@property (weak, nonatomic) IBOutlet UIView *selectView; +@property (weak, nonatomic) IBOutlet UIButton *attentionBtn; +- (IBAction)attentionBtnClick:(id)sender; + +@end diff --git a/Ash_AWord/Views/User/PersonalTopView.m b/Ash_AWord/Views/User/PersonalTopView.m new file mode 100644 index 0000000..e3539f0 --- /dev/null +++ b/Ash_AWord/Views/User/PersonalTopView.m @@ -0,0 +1,76 @@ +// +// PersonalTopView.m +// Ash_AWord +// +// Created by xmfish on 15/6/10. +// Copyright (c) 2015年 ash. All rights reserved. +// + +#import "PersonalTopView.h" + +@implementation PersonalTopView +{ + BOOL _isSelectImage; +} +/* +// Only override drawRect: if you perform custom drawing. +// An empty implementation adversely affects performance during animation. +- (void)drawRect:(CGRect)rect { + // Drawing code +} +*/ +-(void)awakeFromNib +{ + _isSelectImage = YES; + + _line1.backgroundColor = [UIColor lineColor]; + _line2.backgroundColor = [UIColor lineColor]; + _line3.backgroundColor = [UIColor lineColor]; + _line1Width.constant = 0.5; + _line2Width.constant = 0.5; + _line3Height.constant = 0.5; + + _avatarBtn.layer.masksToBounds = YES; + _avatarBtn.layer.cornerRadius = _avatarBtn.frame.size.width/2; + + [_voiceBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; + [_imageBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal]; + + [_attentionBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal]; + _attentionBtn.layer.masksToBounds = YES; + _attentionBtn.layer.cornerRadius = 2.0; + +} +- (IBAction)avatarBtnClick:(id)sender { +} +- (IBAction)voiceBtnClick:(id)sender { + if (_isSelectImage == NO) { + return; + } + _isSelectImage = NO; + [_imageBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; + [_voiceBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal]; + + CGRect frame = _selectView.frame; + frame.origin.x = kScreenWidth/2; + [UIView animateWithDuration:0.3 animations:^{ + _selectView.frame = frame; + }]; +} +- (IBAction)imageBtnClick:(id)sender { + if (_isSelectImage == YES) { + return; + } + _isSelectImage = YES; + [_imageBtn setTitleColor:[UIColor appMainColor] forState:UIControlStateNormal]; + [_voiceBtn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; + + CGRect frame = _selectView.frame; + frame.origin.x = 0; + [UIView animateWithDuration:0.3 animations:^{ + _selectView.frame = frame; + }]; +} +- (IBAction)attentionBtnClick:(id)sender { +} +@end diff --git a/Ash_AWord/Views/User/PersonalTopView.xib b/Ash_AWord/Views/User/PersonalTopView.xib new file mode 100644 index 0000000..ab0ed7c --- /dev/null +++ b/Ash_AWord/Views/User/PersonalTopView.xib @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +