├── 1.gif
├── 2.gif
├── InstagramFeedView
├── unnamed.png
├── Assets.xcassets
│ ├── Contents.json
│ ├── Like.imageset
│ │ ├── ic_like.png
│ │ ├── ic_like-1.png
│ │ ├── ic_like-2.png
│ │ └── Contents.json
│ ├── Menu.imageset
│ │ ├── ic_menu.png
│ │ ├── ic_menu-1.png
│ │ └── Contents.json
│ ├── Comment.imageset
│ │ ├── ic_chat_1.png
│ │ ├── ic_chat_1-1.png
│ │ ├── ic_chat_1-2.png
│ │ └── Contents.json
│ ├── Share.imageset
│ │ ├── ic_share_file.png
│ │ ├── ic_share_file-1.png
│ │ ├── ic_share_file-2.png
│ │ └── Contents.json
│ ├── PostImage.imageset
│ │ ├── placeholder.png
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ ├── unnamed-29@2x.png
│ │ ├── unnamed-29@3x.png
│ │ └── Contents.json
│ └── noUser.imageset
│ │ ├── no-user-image-square-9f6a473a32ad639f619216331d10d61ce1b35c9271d5683920960e1a5ee45bb8.jpg
│ │ └── Contents.json
├── TableViewCells
│ ├── DetailText
│ │ ├── DetailText.h
│ │ ├── DetailText.m
│ │ └── DetailText.xib
│ ├── PostImage
│ │ ├── PostImage.h
│ │ ├── PostImage.xib
│ │ └── PostImage.m
│ ├── PostDescription
│ │ ├── PostDescription.h
│ │ ├── PostDescription.m
│ │ └── PostDescription.xib
│ ├── UploadedOn
│ │ ├── UploadedOn.h
│ │ ├── UploadedOn.m
│ │ └── UploadedOn.xib
│ ├── SectionHeaderOfPost
│ │ ├── SectionHeaderOfPost.h
│ │ ├── SectionHeaderOfPost.m
│ │ └── SectionHeaderOfPost.xib
│ ├── Buttons
│ │ ├── Buttons.h
│ │ ├── Buttons.m
│ │ └── Buttons.xib
│ ├── SuggestedPeopleCell
│ │ ├── SuggestedPeopleCell.h
│ │ ├── SuggestedPeopleCollectionViewCell.h
│ │ ├── SuggestedPeopleCollectionViewCell.m
│ │ ├── SuggestedPeopleCell.m
│ │ ├── SuggestedPeopleCell.xib
│ │ └── SuggestedPeopleCollectionViewCell.xib
│ └── TotalLikes&Comments
│ │ ├── TotalLikes_Comments.m
│ │ ├── TotalLikes_Comments.h
│ │ └── TotalLikes_Comments.xib
├── AppDelegate.h
├── main.m
├── ViewController.h
├── Info.plist
├── AppDelegate.m
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.storyboard
└── ViewController.m
├── InstagramFeedView.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── Sagar_Shirbhate.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
├── xcuserdata
│ └── Sagar_Shirbhate.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── InstagramFeedView.xcscheme
└── project.pbxproj
├── README.md
└── License.md
/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/1.gif
--------------------------------------------------------------------------------
/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/2.gif
--------------------------------------------------------------------------------
/InstagramFeedView/unnamed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/unnamed.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Menu.imageset/ic_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Menu.imageset/ic_menu.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like-1.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Like.imageset/ic_like-2.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Menu.imageset/ic_menu-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Menu.imageset/ic_menu-1.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1-1.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Comment.imageset/ic_chat_1-2.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/PostImage.imageset/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/PostImage.imageset/placeholder.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file-1.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/Share.imageset/ic_share_file-2.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/AppIcon.appiconset/unnamed-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/AppIcon.appiconset/unnamed-29@2x.png
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/AppIcon.appiconset/unnamed-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/AppIcon.appiconset/unnamed-29@3x.png
--------------------------------------------------------------------------------
/InstagramFeedView.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/InstagramFeedView.xcodeproj/project.xcworkspace/xcuserdata/Sagar_Shirbhate.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView.xcodeproj/project.xcworkspace/xcuserdata/Sagar_Shirbhate.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/noUser.imageset/no-user-image-square-9f6a473a32ad639f619216331d10d61ce1b35c9271d5683920960e1a5ee45bb8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sagarshirbhate/Instagram-Feed-View/HEAD/InstagramFeedView/Assets.xcassets/noUser.imageset/no-user-image-square-9f6a473a32ad639f619216331d10d61ce1b35c9271d5683920960e1a5ee45bb8.jpg
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/DetailText/DetailText.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailText.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DetailText : UITableViewCell
12 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
13 | @end
14 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostImage/PostImage.h:
--------------------------------------------------------------------------------
1 | //
2 | // PostImage.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PostImage : UITableViewCell
12 | @property (strong, nonatomic) IBOutlet UIImageView *postImage;
13 |
14 | @end
15 |
--------------------------------------------------------------------------------
/InstagramFeedView/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // InstagramFeedView
4 | //
5 | // Created by Sagar Shirbhate on 10/24/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostDescription/PostDescription.h:
--------------------------------------------------------------------------------
1 | //
2 | // PostDescription.h
3 | // Traweller
4 | //
5 | // Created by Sandip Jadhav on 09/08/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface PostDescription : UITableViewCell
12 | @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
13 | @end
14 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/UploadedOn/UploadedOn.h:
--------------------------------------------------------------------------------
1 | //
2 | // UploadedOn.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UploadedOn : UITableViewCell
12 |
13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
14 |
15 |
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/InstagramFeedView/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // InstagramFeedView
4 | //
5 | // Created by Sagar Shirbhate on 10/24/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/PostImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "placeholder.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Like.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ic_like.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "ic_like-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "ic_like-2.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Menu.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ic_menu.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "ic_menu-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "ic_menu-2.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/noUser.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "no-user-image-square-9f6a473a32ad639f619216331d10d61ce1b35c9271d5683920960e1a5ee45bb8.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Comment.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ic_chat_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "ic_chat_1-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "ic_chat_1-2.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/Share.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "ic_share_file.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "ic_share_file-1.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "ic_share_file-2.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/InstagramFeedView/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // InstagramFeedView
4 | //
5 | // Created by Sagar Shirbhate on 10/24/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 | {
13 | NSMutableArray * feedDataArray;
14 | }
15 | @property (nonatomic, weak) NSMutableDictionary *contentOffsetDictionary;
16 | @property (weak, nonatomic) IBOutlet UITableView *tableview;
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/DetailText/DetailText.m:
--------------------------------------------------------------------------------
1 | //
2 | // DetailText.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "DetailText.h"
10 |
11 | @implementation DetailText
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | }
16 |
17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
18 | [super setSelected:selected animated:animated];
19 |
20 | // Configure the view for the selected state
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/UploadedOn/UploadedOn.m:
--------------------------------------------------------------------------------
1 | //
2 | // UploadedOn.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "UploadedOn.h"
10 |
11 | @implementation UploadedOn
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostDescription/PostDescription.m:
--------------------------------------------------------------------------------
1 | //
2 | // PostDescription.m
3 | // Traweller
4 | //
5 | // Created by Sandip Jadhav on 09/08/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "PostDescription.h"
10 |
11 | @implementation PostDescription
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/InstagramFeedView.xcodeproj/xcuserdata/Sagar_Shirbhate.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | InstagramFeedView.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 134328291DBE32890000A2DD
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SectionHeaderOfPost/SectionHeaderOfPost.h:
--------------------------------------------------------------------------------
1 | //
2 | // SectionHeaderOfPost.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SectionHeaderOfPost : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIImageView *profileImage;
13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (strong, nonatomic) IBOutlet UIButton *menuBtn;
15 |
16 |
17 | @property (nonatomic, copy) void (^menuButtonclick)(SectionHeaderOfPost *aCell);
18 | @property (nonatomic, copy) void (^clickedOnname)(SectionHeaderOfPost *aCell);
19 |
20 | - (IBAction)menuButtonclick:(id)sender;
21 | - (IBAction)clickedOnname:(id)sender;
22 | @end
23 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/Buttons/Buttons.h:
--------------------------------------------------------------------------------
1 | //
2 | // Buttons.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface Buttons : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIButton *likeButton;
13 | @property (weak, nonatomic) IBOutlet UIButton *commentButton;
14 | @property (weak, nonatomic) IBOutlet UIButton *shareButton;
15 |
16 | @property (nonatomic, copy) void (^LikeButtonTapAction)(Buttons *aCell);
17 | @property (nonatomic, copy) void (^CommentButtonTapAction)(Buttons *aCell);
18 | @property (nonatomic, copy) void (^ShareButtonTapAction)(Buttons *aCell);
19 |
20 | - (IBAction)likeClick:(id)sender;
21 | - (IBAction)shareclick:(id)sender;
22 | - (IBAction)commentClick:(id)sender;
23 | @end
24 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SuggestedPeopleCell.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/11/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "SuggestedPeopleCollectionViewCell.h"
11 |
12 | @interface CollectionView : UICollectionView
13 |
14 | @property (nonatomic, strong) NSIndexPath *indexPath;
15 |
16 | @end
17 |
18 | static NSString *CollectionViewCellIdentifier = @"SuggestedPeopleCollectionViewCell";
19 |
20 |
21 | @interface SuggestedPeopleCell : UITableViewCell
22 |
23 | @property (nonatomic, strong) CollectionView *collectionView;
24 |
25 | - (void)setCollectionViewDataSourceDelegate:(id)dataSourceDelegate indexPath:(NSIndexPath *)indexPath;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCollectionViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // SuggestedPeopleCollectionViewCell.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/11/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SuggestedPeopleCollectionViewCell : UICollectionViewCell
12 | @property (weak, nonatomic) IBOutlet UIImageView *profileImage;
13 | @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
14 | @property (weak, nonatomic) IBOutlet UILabel *subTitleLabel;
15 | @property (weak, nonatomic) IBOutlet UIButton *FollowButton;
16 | @property (weak, nonatomic) IBOutlet UIButton *closeButton;
17 |
18 | @property (nonatomic, copy) void (^followButtonClick)(SuggestedPeopleCollectionViewCell *aCell);
19 | @property (nonatomic, copy) void (^closeBtnclick)(SuggestedPeopleCollectionViewCell *aCell);
20 |
21 |
22 | - (IBAction)followButtonClick:(id)sender;
23 |
24 | - (IBAction)closeBtnclick:(id)sender;
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/TotalLikes&Comments/TotalLikes_Comments.m:
--------------------------------------------------------------------------------
1 | //
2 | // TotalLikes&Comments.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "TotalLikes_Comments.h"
10 |
11 | @implementation TotalLikes_Comments
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 |
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | - (IBAction)openLikesClick:(id)sender {
25 | if (self.openLikesTapAction) {
26 | self.openLikesTapAction(self);
27 | }
28 | }
29 |
30 | - (IBAction)totalLikesclick:(id)sender {
31 | if (self.LikeButtonTapAction) {
32 | self.LikeButtonTapAction(self);
33 | }
34 | }
35 |
36 | - (IBAction)totalCommentsclick:(id)sender {
37 | if (self.CommentButtonTapAction) {
38 | self.CommentButtonTapAction(self);
39 | }
40 | }
41 | @end
42 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/TotalLikes&Comments/TotalLikes_Comments.h:
--------------------------------------------------------------------------------
1 | //
2 | // TotalLikes&Comments.h
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface TotalLikes_Comments : UITableViewCell
12 | @property (weak, nonatomic) IBOutlet UIButton *totalLikesButton;
13 | @property (weak, nonatomic) IBOutlet UIButton *totalCommentsButon;
14 | @property (weak, nonatomic) IBOutlet UIButton *openLikes;
15 | @property (weak, nonatomic) IBOutlet UILabel *ratingLabel;
16 | @property (weak, nonatomic) IBOutlet UILabel *totalRatedPeople;
17 |
18 | @property (nonatomic, copy) void (^LikeButtonTapAction)(TotalLikes_Comments *aCell);
19 | @property (nonatomic, copy) void (^CommentButtonTapAction)(TotalLikes_Comments *aCell);
20 | @property (nonatomic, copy) void (^openLikesTapAction)(TotalLikes_Comments *aCell);
21 |
22 | - (IBAction)openLikesClick:(id)sender;
23 | - (IBAction)totalLikesclick:(id)sender;
24 | - (IBAction)totalCommentsclick:(id)sender;
25 | @end
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 | 
4 | 
5 |
6 | Instagram Feeds View
7 | -
8 | * It is just a demo view to show feeds as shown in Instagram.
9 | * In this demo UITableview used with Multiple cells.
10 | * All description of post(Image,User,Like,Comment etc..) can be managed by the array of an post.
11 | * All actions and updations of cell are manged by blocks so no need to update cell by using Tableview Refresh delegate.
12 | * While updating sections it scrolls ups/Down but by using blocks nothing happen and updations can be done smoothly.
13 | * suggestions are always welcome.
14 |
15 | Output will come like this
16 | -
17 | | Potrait View | Landscape View|
18 | | ------------- |:-------------:|
19 | | ||
20 |
21 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SectionHeaderOfPost/SectionHeaderOfPost.m:
--------------------------------------------------------------------------------
1 | //
2 | // SectionHeaderOfPost.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "SectionHeaderOfPost.h"
10 |
11 |
12 |
13 | @implementation SectionHeaderOfPost
14 |
15 | - (void)awakeFromNib {
16 | [super awakeFromNib];
17 |
18 | _profileImage.layer.cornerRadius=19;
19 |
20 |
21 |
22 | _profileImage.userInteractionEnabled=YES;
23 | UITapGestureRecognizer *tapRecognizerq = [[UITapGestureRecognizer alloc] init];
24 | [tapRecognizerq addTarget:self action:@selector(clickedmage:)];
25 | [_profileImage addGestureRecognizer:tapRecognizerq];
26 |
27 | }
28 |
29 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
30 | [super setSelected:selected animated:animated];
31 |
32 | // Configure the view for the selected state
33 | }
34 |
35 | - (IBAction)menuButtonclick:(id)sender {
36 | if (self.menuButtonclick) {
37 | self.menuButtonclick(self);
38 | }
39 | }
40 |
41 | - (IBAction)clickedOnname:(id)sender {
42 | if (self.clickedOnname) {
43 | self.clickedOnname(self);
44 | }
45 | }
46 |
47 | -(void)clickedmage:(UITapGestureRecognizer *)sender {
48 |
49 | if (self.clickedOnname) {
50 | self.clickedOnname(self);
51 | }
52 |
53 | }
54 | @end
55 |
--------------------------------------------------------------------------------
/InstagramFeedView/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "29x29",
5 | "idiom" : "iphone",
6 | "filename" : "unnamed-29@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "29x29",
11 | "idiom" : "iphone",
12 | "filename" : "unnamed-29@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "idiom" : "iphone",
17 | "size" : "40x40",
18 | "scale" : "2x"
19 | },
20 | {
21 | "idiom" : "iphone",
22 | "size" : "40x40",
23 | "scale" : "3x"
24 | },
25 | {
26 | "idiom" : "iphone",
27 | "size" : "60x60",
28 | "scale" : "2x"
29 | },
30 | {
31 | "idiom" : "iphone",
32 | "size" : "60x60",
33 | "scale" : "3x"
34 | },
35 | {
36 | "idiom" : "ipad",
37 | "size" : "29x29",
38 | "scale" : "1x"
39 | },
40 | {
41 | "idiom" : "ipad",
42 | "size" : "29x29",
43 | "scale" : "2x"
44 | },
45 | {
46 | "idiom" : "ipad",
47 | "size" : "40x40",
48 | "scale" : "1x"
49 | },
50 | {
51 | "idiom" : "ipad",
52 | "size" : "40x40",
53 | "scale" : "2x"
54 | },
55 | {
56 | "idiom" : "ipad",
57 | "size" : "76x76",
58 | "scale" : "1x"
59 | },
60 | {
61 | "idiom" : "ipad",
62 | "size" : "76x76",
63 | "scale" : "2x"
64 | },
65 | {
66 | "idiom" : "ipad",
67 | "size" : "83.5x83.5",
68 | "scale" : "2x"
69 | }
70 | ],
71 | "info" : {
72 | "version" : 1,
73 | "author" : "xcode"
74 | }
75 | }
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCollectionViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // SuggestedPeopleCollectionViewCell.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/11/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "SuggestedPeopleCollectionViewCell.h"
10 |
11 |
12 | @implementation SuggestedPeopleCollectionViewCell
13 |
14 | - (void)awakeFromNib {
15 | [super awakeFromNib];
16 |
17 | _profileImage.layer.cornerRadius=35;
18 | _profileImage.clipsToBounds=YES;
19 | _profileImage.layer.borderWidth=0.5;
20 | _profileImage.layer.borderColor=[UIColor colorWithRed: 204.0/255.0 green: 204.0/255.0 blue: 204.0/255.0 alpha:1.0].CGColor;
21 |
22 | _FollowButton.layer.cornerRadius=3;
23 | _FollowButton.clipsToBounds=YES;
24 | _FollowButton.layer.borderWidth=0.5;
25 |
26 | _closeButton.layer.cornerRadius=7.5;
27 | _closeButton.clipsToBounds=YES;
28 | // _closeButton.hidden=YES;
29 |
30 | _profileImage.userInteractionEnabled=YES;
31 | UITapGestureRecognizer *tapRecognizerq = [[UITapGestureRecognizer alloc] init];
32 | [tapRecognizerq addTarget:self action:@selector(clickedmage:)];
33 | [_profileImage addGestureRecognizer:tapRecognizerq];
34 | }
35 |
36 | - (IBAction)followButtonClick:(id)sender {
37 | if (self.followButtonClick) {
38 | self.followButtonClick(self);
39 | }
40 | }
41 |
42 | - (IBAction)closeBtnclick:(id)sender {
43 | if (self.closeBtnclick) {
44 | self.closeBtnclick(self);
45 | }
46 | }
47 |
48 | -(void)clickedmage:(UITapGestureRecognizer *)sender {
49 |
50 | }
51 |
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/InstagramFeedView/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIcons
10 |
11 | CFBundleIcons~ipad
12 |
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | $(PRODUCT_NAME)
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UIRequiredDeviceCapabilities
32 |
33 | armv7
34 |
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/Buttons/Buttons.m:
--------------------------------------------------------------------------------
1 | //
2 | // Buttons.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "Buttons.h"
10 |
11 | @implementation Buttons
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 |
16 | // CGFloat separatorInset; // Separator x position
17 | // CGFloat separatorHeight;
18 | // CGFloat separatorWidth;
19 | // CGFloat separatorY;
20 | // UIImageView *separator;
21 | // UIColor *separatorBGColor;
22 | //
23 | // separatorY = self.frame.size.height;
24 | // separatorHeight = (1.0 / [UIScreen mainScreen].scale); // This assures you to have a 1px line height whatever the screen resolution
25 | // separatorWidth = self.frame.size.width;
26 | // separatorInset = 15.0f;
27 | // separatorBGColor = [UIColor colorWithRed: 204.0/255.0 green: 204.0/255.0 blue: 204.0/255.0 alpha:1.0];
28 | //
29 | // separator = [[UIImageView alloc] initWithFrame:CGRectMake(separatorInset, separatorY, separatorWidth,separatorHeight)];
30 | // separator.backgroundColor = separatorBGColor;
31 | // [self addSubview:separator];
32 | //
33 | // separator = [[UIImageView alloc] initWithFrame:CGRectMake(separatorInset, 0, separatorWidth,separatorHeight)];
34 | // separator.backgroundColor = separatorBGColor;
35 | // //[self addSubview:separator];
36 |
37 | }
38 |
39 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
40 | [super setSelected:selected animated:animated];
41 |
42 | // Configure the view for the selected state
43 | }
44 |
45 | - (IBAction)likeClick:(id)sender {
46 | if (self.LikeButtonTapAction) {
47 | self.LikeButtonTapAction(self);
48 | }
49 | }
50 |
51 | - (IBAction)shareclick:(id)sender {
52 | if (self.ShareButtonTapAction) {
53 | self.ShareButtonTapAction(self);
54 | }
55 | }
56 |
57 | - (IBAction)commentClick:(id)sender {
58 | if (self.CommentButtonTapAction) {
59 | self.CommentButtonTapAction(self);
60 | }
61 | }
62 | @end
63 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // SuggestedPeopleCell.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/11/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "SuggestedPeopleCell.h"
10 |
11 | @implementation CollectionView
12 |
13 | @end
14 |
15 |
16 | @implementation SuggestedPeopleCell
17 |
18 | - (void)awakeFromNib {
19 | [super awakeFromNib];
20 |
21 | UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
22 | layout.sectionInset = UIEdgeInsetsMake(10, 10,-15, 10);
23 | layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
24 | self.collectionView = [[CollectionView alloc] initWithFrame:CGRectMake(0, 150, self.contentView.frame.size.width, 130) collectionViewLayout:layout];
25 | [self.collectionView registerClass:[SuggestedPeopleCollectionViewCell class] forCellWithReuseIdentifier:CollectionViewCellIdentifier];
26 |
27 | UINib *cellNib = [UINib nibWithNibName:@"SuggestedPeopleCollectionViewCell" bundle:nil];
28 | [self.collectionView registerNib:cellNib forCellWithReuseIdentifier:@"SuggestedPeopleCollectionViewCell"];
29 |
30 | self.collectionView.backgroundColor = [UIColor clearColor];
31 | self.collectionView.showsHorizontalScrollIndicator = NO;
32 | [self.contentView addSubview:self.collectionView];
33 |
34 | }
35 |
36 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
37 | [super setSelected:selected animated:animated];
38 | }
39 |
40 | -(void)layoutSubviews
41 | {
42 | [super layoutSubviews];
43 | self.collectionView.frame = self.contentView.bounds;
44 | }
45 |
46 | - (void)setCollectionViewDataSourceDelegate:(id)dataSourceDelegate indexPath:(NSIndexPath *)indexPath
47 | {
48 | self.collectionView.dataSource = dataSourceDelegate;
49 | self.collectionView.delegate = dataSourceDelegate;
50 | self.collectionView.indexPath = indexPath;
51 | [self.collectionView reloadData];
52 | }
53 |
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/InstagramFeedView/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // InstagramFeedView
4 | //
5 | // Created by Sagar Shirbhate on 10/24/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 |
10 |
11 | #import "AppDelegate.h"
12 |
13 | @interface AppDelegate ()
14 |
15 | @end
16 |
17 | @implementation AppDelegate
18 |
19 |
20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
21 | // Override point for customization after application launch.
22 | return YES;
23 | }
24 |
25 |
26 | - (void)applicationWillResignActive:(UIApplication *)application {
27 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
28 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
29 | }
30 |
31 |
32 | - (void)applicationDidEnterBackground:(UIApplication *)application {
33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
35 | }
36 |
37 |
38 | - (void)applicationWillEnterForeground:(UIApplication *)application {
39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
40 | }
41 |
42 |
43 | - (void)applicationDidBecomeActive:(UIApplication *)application {
44 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
45 | }
46 |
47 |
48 | - (void)applicationWillTerminate:(UIApplication *)application {
49 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
50 | }
51 |
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostImage/PostImage.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/InstagramFeedView/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostImage/PostImage.m:
--------------------------------------------------------------------------------
1 | //
2 | // PostImage.m
3 | // Traweller
4 | //
5 | // Created by Sagar Shirbhate on 8/9/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "PostImage.h"
10 |
11 | #define iPAD ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad)
12 | #define iPhone4s ([[UIScreen mainScreen] bounds].size.height == 480)?TRUE:FALSE
13 | #define iPhone5or5s ([[UIScreen mainScreen] bounds].size.height == 568)?TRUE:FALSE
14 | #define iPhone6plus ([[UIScreen mainScreen] bounds].size.height == 736)?TRUE:FALSE
15 | #define iPhone6 ([[UIScreen mainScreen] bounds].size.height == 667)?TRUE:FALSE
16 |
17 | @implementation PostImage
18 |
19 | - (void)awakeFromNib {
20 | [super awakeFromNib];
21 |
22 | if (iPAD) {
23 | [_postImage addConstraint:[NSLayoutConstraint constraintWithItem:_postImage
24 | attribute:NSLayoutAttributeHeight
25 | relatedBy:NSLayoutRelationLessThanOrEqual
26 | toItem:nil
27 | attribute: NSLayoutAttributeNotAnAttribute
28 | multiplier:1
29 | constant:600]];
30 | }else{
31 | if (iPhone6plus) {
32 | [_postImage addConstraint:[NSLayoutConstraint constraintWithItem:_postImage
33 | attribute:NSLayoutAttributeHeight
34 | relatedBy:NSLayoutRelationLessThanOrEqual
35 | toItem:nil
36 | attribute: NSLayoutAttributeNotAnAttribute
37 | multiplier:1
38 | constant:360]];
39 | }else if (iPhone6) {
40 | [_postImage addConstraint:[NSLayoutConstraint constraintWithItem:_postImage
41 | attribute:NSLayoutAttributeHeight
42 | relatedBy:NSLayoutRelationLessThanOrEqual
43 | toItem:nil
44 | attribute: NSLayoutAttributeNotAnAttribute
45 | multiplier:1
46 | constant:320]];
47 | }else{
48 | [_postImage addConstraint:[NSLayoutConstraint constraintWithItem:_postImage
49 | attribute:NSLayoutAttributeHeight
50 | relatedBy:NSLayoutRelationLessThanOrEqual
51 | toItem:nil
52 | attribute: NSLayoutAttributeNotAnAttribute
53 | multiplier:1
54 | constant:280]];
55 | }
56 | }
57 |
58 |
59 | }
60 |
61 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
62 | [super setSelected:selected animated:animated];
63 |
64 | }
65 |
66 |
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/DetailText/DetailText.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/PostDescription/PostDescription.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/UploadedOn/UploadedOn.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/InstagramFeedView.xcodeproj/xcuserdata/Sagar_Shirbhate.xcuserdatad/xcschemes/InstagramFeedView.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/InstagramFeedView/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SectionHeaderOfPost/SectionHeaderOfPost.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/Buttons/Buttons.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
28 |
38 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/TotalLikes&Comments/TotalLikes_Comments.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
33 |
44 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/InstagramFeedView/TableViewCells/SuggestedPeopleCell/SuggestedPeopleCollectionViewCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
22 |
37 |
49 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
--------------------------------------------------------------------------------
/License.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/InstagramFeedView/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // InstagramFeedView
4 | //
5 | // Created by Sagar Shirbhate on 10/24/16.
6 | // Copyright © 2016 Sagar Shirbhate. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | #import "UploadedOn.h"
12 | #import "TotalLikes_Comments.h"
13 | #import "SuggestedPeopleCell.h"
14 | #import "PostImage.h"
15 | #import "PostDescription.h"
16 | #import "DetailText.h"
17 | #import "Buttons.h"
18 | #import "SectionHeaderOfPost.h"
19 |
20 | @interface ViewController ()
21 |
22 | @end
23 |
24 | @implementation ViewController
25 |
26 | - (void)viewDidLoad {
27 | [super viewDidLoad];
28 |
29 | [self registerCells];
30 |
31 | _tableview.estimatedRowHeight=10;
32 | _tableview.rowHeight=UITableViewAutomaticDimension;
33 |
34 | // Feed data array set add one extra array for which cell should be shown as per your json I have used six cells
35 |
36 | feedDataArray=[NSMutableArray new];
37 | for (int i=0; i<10; i++) {
38 | NSArray * data = @[@"date",@"description",@"PostImage",@"Postdescription",@"Buttons",@"LikeComment"];
39 | NSDictionary * dict =@{
40 | @"dataToshow":data
41 | };
42 | [feedDataArray addObject:dict];
43 | }
44 | }
45 |
46 |
47 | - (void)didReceiveMemoryWarning {
48 | [super didReceiveMemoryWarning];
49 | // Dispose of any resources that can be recreated.
50 | }
51 |
52 |
53 | /**
54 | * @author Sagar Shirbhate, 16-10-25 12:10:52
55 | *
56 | * Register Xib of cells with storybord. You can use this anywhere in your project
57 | */
58 | -(void)registerCells{
59 |
60 | UINib *nib = [UINib nibWithNibName:@"SectionHeaderOfPost" bundle:nil];
61 | [_tableview registerNib:nib forCellReuseIdentifier:@"SectionHeaderOfPost"];
62 |
63 | nib = [UINib nibWithNibName:@"UploadedOn" bundle:nil];
64 | [_tableview registerNib:nib forCellReuseIdentifier:@"UploadedOn"];
65 |
66 | nib = [UINib nibWithNibName:@"TotalLikes_Comments" bundle:nil];
67 | [_tableview registerNib:nib forCellReuseIdentifier:@"TotalLikes_Comments"];
68 |
69 | nib = [UINib nibWithNibName:@"PostImage" bundle:nil];
70 | [_tableview registerNib:nib forCellReuseIdentifier:@"PostImage"];
71 |
72 | nib = [UINib nibWithNibName:@"Buttons" bundle:nil];
73 | [_tableview registerNib:nib forCellReuseIdentifier:@"Buttons"];
74 |
75 | nib = [UINib nibWithNibName:@"DetailText" bundle:nil];
76 | [_tableview registerNib:nib forCellReuseIdentifier:@"DetailText"];
77 |
78 | nib = [UINib nibWithNibName:@"PostDescription" bundle:nil];
79 | [_tableview registerNib:nib forCellReuseIdentifier:@"PostDescription"];
80 |
81 | nib = [UINib nibWithNibName:@"SuggestedPeopleCell" bundle:nil];
82 | [_tableview registerNib:nib forCellReuseIdentifier:@"SuggestedPeopleCell"];
83 | }
84 |
85 | #pragma mark === Tableview DataSources=======
86 | -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
87 | return feedDataArray.count+1;
88 | }
89 |
90 | - (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section {
91 | if (section==0) {
92 |
93 | return 1; // If wanna to show suggested people then 1 otherwise 0
94 |
95 | }else{
96 |
97 | // No of things you wanna to show into a feed View.
98 | NSArray * arr =[[feedDataArray objectAtIndex:section-1]valueForKey:@"dataToshow"];
99 | return arr.count;
100 |
101 | }
102 | return 0;
103 | }
104 |
105 |
106 |
107 | /**
108 | * @author Sagar Shirbhate, 16-10-14 18:10:17
109 | *
110 | * WHILE DISPLAYING THE SPECIFIC CELL THIS METHOD WILL INVOKE BUT WE INVOKE THIS FOR SUGGESTING PEOPLE TO SET THE DATASOURCE AND DELEGATES FOR UICOLLECTION VIEW
111 | *
112 | * @param tableView TABLEVIEW WHICH IS USED
113 | * @param cell THE CELL WHICH IS SHOWN
114 | * @param indexPath INDEXPATH OF THE CELL
115 | */
116 | -(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
117 | {
118 | if (indexPath.section==0) {
119 | if (indexPath.row==0) {
120 | SuggestedPeopleCell * cell1 =(SuggestedPeopleCell *)cell;
121 | [cell1 setCollectionViewDataSourceDelegate:self indexPath:indexPath];
122 | NSInteger index = cell1.collectionView.tag;
123 | CGFloat horizontalOffset = [self.contentOffsetDictionary[[@(index) stringValue]] floatValue];
124 | [cell1.collectionView setContentOffset:CGPointMake(horizontalOffset, 0)];
125 | }
126 | }
127 | }
128 |
129 |
130 | /**
131 | * @author Sagar Shirbhate, 16-10-14 18:10:36
132 | *
133 | * THIS IS THE HEART OF VIEW IN WHICH ALL THE BASIC THINGS ARE DONE IN THIS METHOD
134 | IN WHICH THE CELLS ARE NOT ARRANGED AS PER THE INDEXPATH. CELLS ARE ARRAGED AS PER THE DATATYPE WHICH THE DATA ARRAY TOOK E.G. IF TEXTFILED THEN CELL RETURNS TEXTFIELD CELL OR IN THE CELL TYPE IS IMAGE THEN IMAGE TYPE CELL IS RETURNEDD.
135 | ALL THE ACTIONS WHICH ARE INVOKED INTO THE BUTTONS OF THE CELL ARE MAINTAINED INTO THE BLOCK BY EHICH NO UI DISTURBENCE WILL BE DONE AND ALL THE WEBSERIVICE METHODS ARE INVOKED INTO THE BACKGROUND QUEUE.
136 | *
137 | * @param aTableView AN USED TABLEVIEW
138 | * @param indexPath INDEXPATH OF PARTICULAR CELL
139 | *
140 | * @return RETURNS A UITABLEVIEWCELL OBJECT
141 | */
142 | - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
143 |
144 | UITableViewCell *cell ;
145 |
146 | if (indexPath.section==0) {
147 |
148 | if (indexPath.row==0) {
149 | SuggestedPeopleCell *cell = [self.tableview dequeueReusableCellWithIdentifier:@"SuggestedPeopleCell" forIndexPath:indexPath];
150 | return cell;
151 | }
152 | }else{
153 |
154 | __block NSMutableDictionary * dataDict =[[NSMutableDictionary alloc]initWithDictionary:[feedDataArray objectAtIndex:indexPath.section-1]];
155 | NSArray * arr =[dataDict valueForKey:@"dataToshow"];
156 |
157 | if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"date"]) {
158 |
159 | UploadedOn *cell = [self.tableview dequeueReusableCellWithIdentifier:@"UploadedOn" forIndexPath:indexPath];
160 | cell.titleLabel.text=@"Uploaded 10 Min Ago.";
161 | return cell;
162 |
163 | }else if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"description"]) {
164 |
165 | PostDescription *cell = [self.tableview dequeueReusableCellWithIdentifier:@"PostDescription" forIndexPath:indexPath];
166 | cell.titleLabel.text=@"Major Details Of Post";
167 | return cell;
168 |
169 | } else if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"PostImage"]) {
170 |
171 | PostImage *cell = [self.tableview dequeueReusableCellWithIdentifier:@"PostImage" forIndexPath:indexPath];
172 | // cell.postImage.image=[UIImage imageNamed:@""];
173 |
174 | return cell;
175 | }else if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"Postdescription"]) {
176 |
177 | DetailText *cell = [self.tableview dequeueReusableCellWithIdentifier:@"DetailText" forIndexPath:indexPath];
178 | cell.titleLabel.text =@"Minor details of Post \n You can Hide this too.";
179 |
180 | return cell;
181 |
182 | }else if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"LikeComment"]) {
183 |
184 | TotalLikes_Comments *cell = [self.tableview dequeueReusableCellWithIdentifier:@"TotalLikes_Comments" forIndexPath:indexPath];
185 |
186 |
187 | cell.LikeButtonTapAction = ^(TotalLikes_Comments *aCell){
188 | NSLog(@"Like ButtonClicked");
189 | };
190 |
191 | cell.CommentButtonTapAction = ^(TotalLikes_Comments *aCell){
192 | NSLog(@"Comment ButtonClicked");
193 | };
194 |
195 | cell.openLikesTapAction = ^(TotalLikes_Comments * aCell){
196 | NSLog(@"Open Likes ButtonClicked");
197 | };
198 | return cell;
199 |
200 | }else if ([[arr objectAtIndex:indexPath.row]isEqualToString:@"Buttons"]) {
201 |
202 | Buttons *cell = [self.tableview dequeueReusableCellWithIdentifier:@"Buttons" forIndexPath:indexPath];
203 |
204 |
205 | cell.LikeButtonTapAction = ^(Buttons *aCell){
206 | NSLog(@"Likes ButtonClicked");
207 | };
208 |
209 | cell.CommentButtonTapAction = ^(Buttons *aCell){
210 | NSLog(@" Comments ButtonClicked");
211 | };
212 |
213 | cell.ShareButtonTapAction = ^(Buttons * aCell){
214 | NSLog(@" Share ButtonClicked");
215 | };
216 | return cell;
217 |
218 | }
219 | }
220 | return cell;
221 | }
222 |
223 |
224 | -(UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
225 | static NSString *CellIdentifier = @"SectionHeaderOfPost";
226 | SectionHeaderOfPost *headerView = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
227 | if (headerView == nil){
228 | [NSException raise:@"headerView == nil.." format:@"No cells with matching CellIdentifier loaded from your storyboard"];
229 | }
230 |
231 |
232 | if (section!=0) {
233 |
234 | headerView.titleLabel.text=@"Post Uploaded by User";
235 | headerView.menuButtonclick = ^(SectionHeaderOfPost *aCell){
236 |
237 | UIAlertController * view= [UIAlertController
238 | alertControllerWithTitle:@"Instagram-Feed"
239 | message:nil
240 | preferredStyle:UIAlertControllerStyleActionSheet];
241 |
242 | UIAlertAction* ok = [UIAlertAction
243 | actionWithTitle:@"Cancel"
244 | style:UIAlertActionStyleCancel
245 | handler:^(UIAlertAction * action)
246 | {
247 | NSLog(@" Cancel ButtonClicked");
248 | }];
249 | UIAlertAction* edit = [UIAlertAction
250 | actionWithTitle:@"Edit Post"
251 | style:UIAlertActionStyleDefault
252 | handler:^(UIAlertAction * action)
253 | {
254 | NSLog(@" Edit ButtonClicked");
255 | }];
256 | UIAlertAction* delete = [UIAlertAction
257 | actionWithTitle:@"Delete Post"
258 | style:UIAlertActionStyleDestructive
259 | handler:^(UIAlertAction * action)
260 | {
261 | NSLog(@" Delete ButtonClicked");
262 | }];
263 | UIAlertAction* share = [UIAlertAction
264 | actionWithTitle:@"Share Post"
265 | style:UIAlertActionStyleDefault
266 | handler:^(UIAlertAction * action)
267 | {
268 | NSLog(@" Share ButtonClicked");
269 | }];
270 | UIAlertAction* remove = [UIAlertAction
271 |
272 | actionWithTitle:@"Report & Remove Feed"
273 | style:UIAlertActionStyleDestructive
274 | handler:^(UIAlertAction * action)
275 | {
276 | NSLog(@" report Remove ButtonClicked");
277 | }];
278 |
279 |
280 | [view addAction:ok];
281 | [view addAction:edit];
282 | [view addAction:delete];
283 | [view addAction:remove];
284 | [view addAction:share];
285 |
286 |
287 | CGPoint windowPoint = [aCell convertPoint:aCell.menuBtn.bounds.origin toView:self.view.window];
288 | view.popoverPresentationController.sourceView = self.view;
289 | view.popoverPresentationController.sourceRect = CGRectMake(aCell.menuBtn.frame.origin.x, windowPoint.y+15, aCell.menuBtn.frame.size.width, aCell.menuBtn.frame.size.height);;
290 | [self presentViewController: view animated:YES completion:nil];
291 | };
292 |
293 | headerView.clickedOnname = ^(SectionHeaderOfPost *aCell){
294 | };
295 |
296 |
297 | }
298 |
299 | headerView.layer.borderWidth=0.5;
300 | headerView.layer.borderColor= [UIColor lightGrayColor].CGColor;
301 |
302 | UIView *view = [[UIView alloc] initWithFrame:[headerView frame]];
303 | headerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
304 | [view addSubview:headerView];
305 | return view;
306 | }
307 |
308 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
309 | return UITableViewAutomaticDimension;
310 | }
311 |
312 |
313 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
314 | if (section==0) {
315 | return CGFLOAT_MIN;
316 | }else{
317 | return 44.0f;
318 | }
319 | }
320 |
321 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
322 | {
323 | return 10;
324 | }
325 |
326 |
327 | #pragma mark - UICollectionViewDataSource Methods
328 |
329 | -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
330 | {
331 | return 15;
332 | }
333 |
334 |
335 | -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
336 | {
337 | SuggestedPeopleCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CollectionViewCellIdentifier forIndexPath:indexPath];
338 | //cell.titleLabel.text=@"Name";
339 | // cell.subTitleLabel.text = @"Detail Text";
340 | cell.layer.cornerRadius=4;
341 | cell.layer.borderColor=[UIColor lightGrayColor].CGColor;
342 | cell.layer.borderWidth=0.5;
343 | return cell;
344 | }
345 |
346 | - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
347 | {
348 | return CGSizeMake(140, 150);
349 | }
350 |
351 | #pragma mark - UIScrollViewDelegate Methods
352 |
353 | -(void)scrollViewDidScroll:(UIScrollView *)scrollView
354 | {
355 | if (![scrollView isKindOfClass:[UICollectionView class]]) return;
356 |
357 | CGFloat horizontalOffset = scrollView.contentOffset.x;
358 |
359 | UICollectionView *collectionView = (UICollectionView *)scrollView;
360 | NSInteger index = collectionView.tag;
361 | self.contentOffsetDictionary[[@(index) stringValue]] = @(horizontalOffset);
362 | }
363 |
364 |
365 |
366 | @end
367 |
--------------------------------------------------------------------------------
/InstagramFeedView.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 132E58F11DBF22F300A85B61 /* SectionHeaderOfPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 132E58EF1DBF22F300A85B61 /* SectionHeaderOfPost.m */; };
11 | 132E58F21DBF22F300A85B61 /* SectionHeaderOfPost.xib in Resources */ = {isa = PBXBuildFile; fileRef = 132E58F01DBF22F300A85B61 /* SectionHeaderOfPost.xib */; };
12 | 132E58F41DBF3B4000A85B61 /* unnamed.png in Resources */ = {isa = PBXBuildFile; fileRef = 132E58F31DBF3B4000A85B61 /* unnamed.png */; };
13 | 1343282F1DBE32890000A2DD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1343282E1DBE32890000A2DD /* main.m */; };
14 | 134328321DBE32890000A2DD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 134328311DBE32890000A2DD /* AppDelegate.m */; };
15 | 134328351DBE32890000A2DD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 134328341DBE32890000A2DD /* ViewController.m */; };
16 | 134328381DBE32890000A2DD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 134328361DBE32890000A2DD /* Main.storyboard */; };
17 | 1343283A1DBE32890000A2DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 134328391DBE32890000A2DD /* Assets.xcassets */; };
18 | 1343283D1DBE32890000A2DD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1343283B1DBE32890000A2DD /* LaunchScreen.storyboard */; };
19 | 139324021DBE352B00FE8130 /* Buttons.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323E11DBE352B00FE8130 /* Buttons.m */; };
20 | 139324031DBE352B00FE8130 /* Buttons.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323E21DBE352B00FE8130 /* Buttons.xib */; };
21 | 139324041DBE352B00FE8130 /* DetailText.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323E51DBE352B00FE8130 /* DetailText.m */; };
22 | 139324051DBE352B00FE8130 /* DetailText.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323E61DBE352B00FE8130 /* DetailText.xib */; };
23 | 139324061DBE352B00FE8130 /* PostDescription.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323E91DBE352B00FE8130 /* PostDescription.m */; };
24 | 139324071DBE352B00FE8130 /* PostDescription.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323EA1DBE352B00FE8130 /* PostDescription.xib */; };
25 | 139324081DBE352B00FE8130 /* PostImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323ED1DBE352B00FE8130 /* PostImage.m */; };
26 | 139324091DBE352B00FE8130 /* PostImage.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323EE1DBE352B00FE8130 /* PostImage.xib */; };
27 | 1393240C1DBE352B00FE8130 /* SuggestedPeopleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323F51DBE352B00FE8130 /* SuggestedPeopleCell.m */; };
28 | 1393240D1DBE352B00FE8130 /* SuggestedPeopleCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323F61DBE352B00FE8130 /* SuggestedPeopleCell.xib */; };
29 | 1393240E1DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323F81DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.m */; };
30 | 1393240F1DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323F91DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.xib */; };
31 | 139324101DBE352B00FE8130 /* TotalLikes_Comments.m in Sources */ = {isa = PBXBuildFile; fileRef = 139323FC1DBE352B00FE8130 /* TotalLikes_Comments.m */; };
32 | 139324111DBE352B00FE8130 /* TotalLikes_Comments.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139323FD1DBE352B00FE8130 /* TotalLikes_Comments.xib */; };
33 | 139324121DBE352B00FE8130 /* UploadedOn.m in Sources */ = {isa = PBXBuildFile; fileRef = 139324001DBE352B00FE8130 /* UploadedOn.m */; };
34 | 139324131DBE352B00FE8130 /* UploadedOn.xib in Resources */ = {isa = PBXBuildFile; fileRef = 139324011DBE352B00FE8130 /* UploadedOn.xib */; };
35 | /* End PBXBuildFile section */
36 |
37 | /* Begin PBXFileReference section */
38 | 132E58EE1DBF22F300A85B61 /* SectionHeaderOfPost.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SectionHeaderOfPost.h; sourceTree = ""; };
39 | 132E58EF1DBF22F300A85B61 /* SectionHeaderOfPost.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SectionHeaderOfPost.m; sourceTree = ""; };
40 | 132E58F01DBF22F300A85B61 /* SectionHeaderOfPost.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SectionHeaderOfPost.xib; sourceTree = ""; };
41 | 132E58F31DBF3B4000A85B61 /* unnamed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = unnamed.png; sourceTree = ""; };
42 | 1343282A1DBE32890000A2DD /* InstagramFeedView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = InstagramFeedView.app; sourceTree = BUILT_PRODUCTS_DIR; };
43 | 1343282E1DBE32890000A2DD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
44 | 134328301DBE32890000A2DD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
45 | 134328311DBE32890000A2DD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
46 | 134328331DBE32890000A2DD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
47 | 134328341DBE32890000A2DD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
48 | 134328371DBE32890000A2DD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
49 | 134328391DBE32890000A2DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
50 | 1343283C1DBE32890000A2DD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
51 | 1343283E1DBE32890000A2DD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
52 | 139323E01DBE352B00FE8130 /* Buttons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Buttons.h; sourceTree = ""; };
53 | 139323E11DBE352B00FE8130 /* Buttons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Buttons.m; sourceTree = ""; };
54 | 139323E21DBE352B00FE8130 /* Buttons.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Buttons.xib; sourceTree = ""; };
55 | 139323E41DBE352B00FE8130 /* DetailText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailText.h; sourceTree = ""; };
56 | 139323E51DBE352B00FE8130 /* DetailText.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailText.m; sourceTree = ""; };
57 | 139323E61DBE352B00FE8130 /* DetailText.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailText.xib; sourceTree = ""; };
58 | 139323E81DBE352B00FE8130 /* PostDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostDescription.h; sourceTree = ""; };
59 | 139323E91DBE352B00FE8130 /* PostDescription.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostDescription.m; sourceTree = ""; };
60 | 139323EA1DBE352B00FE8130 /* PostDescription.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PostDescription.xib; sourceTree = ""; };
61 | 139323EC1DBE352B00FE8130 /* PostImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostImage.h; sourceTree = ""; };
62 | 139323ED1DBE352B00FE8130 /* PostImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostImage.m; sourceTree = ""; };
63 | 139323EE1DBE352B00FE8130 /* PostImage.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PostImage.xib; sourceTree = ""; };
64 | 139323F41DBE352B00FE8130 /* SuggestedPeopleCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuggestedPeopleCell.h; sourceTree = ""; };
65 | 139323F51DBE352B00FE8130 /* SuggestedPeopleCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SuggestedPeopleCell.m; sourceTree = ""; };
66 | 139323F61DBE352B00FE8130 /* SuggestedPeopleCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SuggestedPeopleCell.xib; sourceTree = ""; };
67 | 139323F71DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuggestedPeopleCollectionViewCell.h; sourceTree = ""; };
68 | 139323F81DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SuggestedPeopleCollectionViewCell.m; sourceTree = ""; };
69 | 139323F91DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SuggestedPeopleCollectionViewCell.xib; sourceTree = ""; };
70 | 139323FB1DBE352B00FE8130 /* TotalLikes_Comments.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TotalLikes_Comments.h; sourceTree = ""; };
71 | 139323FC1DBE352B00FE8130 /* TotalLikes_Comments.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TotalLikes_Comments.m; sourceTree = ""; };
72 | 139323FD1DBE352B00FE8130 /* TotalLikes_Comments.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TotalLikes_Comments.xib; sourceTree = ""; };
73 | 139323FF1DBE352B00FE8130 /* UploadedOn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UploadedOn.h; sourceTree = ""; };
74 | 139324001DBE352B00FE8130 /* UploadedOn.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UploadedOn.m; sourceTree = ""; };
75 | 139324011DBE352B00FE8130 /* UploadedOn.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = UploadedOn.xib; sourceTree = ""; };
76 | /* End PBXFileReference section */
77 |
78 | /* Begin PBXFrameworksBuildPhase section */
79 | 134328271DBE32890000A2DD /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | );
84 | runOnlyForDeploymentPostprocessing = 0;
85 | };
86 | /* End PBXFrameworksBuildPhase section */
87 |
88 | /* Begin PBXGroup section */
89 | 132E58ED1DBF22F300A85B61 /* SectionHeaderOfPost */ = {
90 | isa = PBXGroup;
91 | children = (
92 | 132E58EE1DBF22F300A85B61 /* SectionHeaderOfPost.h */,
93 | 132E58EF1DBF22F300A85B61 /* SectionHeaderOfPost.m */,
94 | 132E58F01DBF22F300A85B61 /* SectionHeaderOfPost.xib */,
95 | );
96 | path = SectionHeaderOfPost;
97 | sourceTree = "";
98 | };
99 | 134328211DBE32890000A2DD = {
100 | isa = PBXGroup;
101 | children = (
102 | 1343282C1DBE32890000A2DD /* InstagramFeedView */,
103 | 1343282B1DBE32890000A2DD /* Products */,
104 | );
105 | sourceTree = "";
106 | };
107 | 1343282B1DBE32890000A2DD /* Products */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 1343282A1DBE32890000A2DD /* InstagramFeedView.app */,
111 | );
112 | name = Products;
113 | sourceTree = "";
114 | };
115 | 1343282C1DBE32890000A2DD /* InstagramFeedView */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 132E58F31DBF3B4000A85B61 /* unnamed.png */,
119 | 139323DE1DBE352B00FE8130 /* TableViewCells */,
120 | 134328301DBE32890000A2DD /* AppDelegate.h */,
121 | 134328311DBE32890000A2DD /* AppDelegate.m */,
122 | 134328331DBE32890000A2DD /* ViewController.h */,
123 | 134328341DBE32890000A2DD /* ViewController.m */,
124 | 134328361DBE32890000A2DD /* Main.storyboard */,
125 | 134328391DBE32890000A2DD /* Assets.xcassets */,
126 | 1343283B1DBE32890000A2DD /* LaunchScreen.storyboard */,
127 | 1343283E1DBE32890000A2DD /* Info.plist */,
128 | 1343282D1DBE32890000A2DD /* Supporting Files */,
129 | );
130 | path = InstagramFeedView;
131 | sourceTree = "";
132 | };
133 | 1343282D1DBE32890000A2DD /* Supporting Files */ = {
134 | isa = PBXGroup;
135 | children = (
136 | 1343282E1DBE32890000A2DD /* main.m */,
137 | );
138 | name = "Supporting Files";
139 | sourceTree = "";
140 | };
141 | 139323DE1DBE352B00FE8130 /* TableViewCells */ = {
142 | isa = PBXGroup;
143 | children = (
144 | 132E58ED1DBF22F300A85B61 /* SectionHeaderOfPost */,
145 | 139323DF1DBE352B00FE8130 /* Buttons */,
146 | 139323E31DBE352B00FE8130 /* DetailText */,
147 | 139323E71DBE352B00FE8130 /* PostDescription */,
148 | 139323EB1DBE352B00FE8130 /* PostImage */,
149 | 139323F31DBE352B00FE8130 /* SuggestedPeopleCell */,
150 | 139323FA1DBE352B00FE8130 /* TotalLikes&Comments */,
151 | 139323FE1DBE352B00FE8130 /* UploadedOn */,
152 | );
153 | path = TableViewCells;
154 | sourceTree = "";
155 | };
156 | 139323DF1DBE352B00FE8130 /* Buttons */ = {
157 | isa = PBXGroup;
158 | children = (
159 | 139323E01DBE352B00FE8130 /* Buttons.h */,
160 | 139323E11DBE352B00FE8130 /* Buttons.m */,
161 | 139323E21DBE352B00FE8130 /* Buttons.xib */,
162 | );
163 | path = Buttons;
164 | sourceTree = "";
165 | };
166 | 139323E31DBE352B00FE8130 /* DetailText */ = {
167 | isa = PBXGroup;
168 | children = (
169 | 139323E41DBE352B00FE8130 /* DetailText.h */,
170 | 139323E51DBE352B00FE8130 /* DetailText.m */,
171 | 139323E61DBE352B00FE8130 /* DetailText.xib */,
172 | );
173 | path = DetailText;
174 | sourceTree = "";
175 | };
176 | 139323E71DBE352B00FE8130 /* PostDescription */ = {
177 | isa = PBXGroup;
178 | children = (
179 | 139323E81DBE352B00FE8130 /* PostDescription.h */,
180 | 139323E91DBE352B00FE8130 /* PostDescription.m */,
181 | 139323EA1DBE352B00FE8130 /* PostDescription.xib */,
182 | );
183 | path = PostDescription;
184 | sourceTree = "";
185 | };
186 | 139323EB1DBE352B00FE8130 /* PostImage */ = {
187 | isa = PBXGroup;
188 | children = (
189 | 139323EC1DBE352B00FE8130 /* PostImage.h */,
190 | 139323ED1DBE352B00FE8130 /* PostImage.m */,
191 | 139323EE1DBE352B00FE8130 /* PostImage.xib */,
192 | );
193 | path = PostImage;
194 | sourceTree = "";
195 | };
196 | 139323F31DBE352B00FE8130 /* SuggestedPeopleCell */ = {
197 | isa = PBXGroup;
198 | children = (
199 | 139323F41DBE352B00FE8130 /* SuggestedPeopleCell.h */,
200 | 139323F51DBE352B00FE8130 /* SuggestedPeopleCell.m */,
201 | 139323F61DBE352B00FE8130 /* SuggestedPeopleCell.xib */,
202 | 139323F71DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.h */,
203 | 139323F81DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.m */,
204 | 139323F91DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.xib */,
205 | );
206 | path = SuggestedPeopleCell;
207 | sourceTree = "";
208 | };
209 | 139323FA1DBE352B00FE8130 /* TotalLikes&Comments */ = {
210 | isa = PBXGroup;
211 | children = (
212 | 139323FB1DBE352B00FE8130 /* TotalLikes_Comments.h */,
213 | 139323FC1DBE352B00FE8130 /* TotalLikes_Comments.m */,
214 | 139323FD1DBE352B00FE8130 /* TotalLikes_Comments.xib */,
215 | );
216 | path = "TotalLikes&Comments";
217 | sourceTree = "";
218 | };
219 | 139323FE1DBE352B00FE8130 /* UploadedOn */ = {
220 | isa = PBXGroup;
221 | children = (
222 | 139323FF1DBE352B00FE8130 /* UploadedOn.h */,
223 | 139324001DBE352B00FE8130 /* UploadedOn.m */,
224 | 139324011DBE352B00FE8130 /* UploadedOn.xib */,
225 | );
226 | path = UploadedOn;
227 | sourceTree = "";
228 | };
229 | /* End PBXGroup section */
230 |
231 | /* Begin PBXNativeTarget section */
232 | 134328291DBE32890000A2DD /* InstagramFeedView */ = {
233 | isa = PBXNativeTarget;
234 | buildConfigurationList = 134328411DBE32890000A2DD /* Build configuration list for PBXNativeTarget "InstagramFeedView" */;
235 | buildPhases = (
236 | 134328261DBE32890000A2DD /* Sources */,
237 | 134328271DBE32890000A2DD /* Frameworks */,
238 | 134328281DBE32890000A2DD /* Resources */,
239 | );
240 | buildRules = (
241 | );
242 | dependencies = (
243 | );
244 | name = InstagramFeedView;
245 | productName = InstagramFeedView;
246 | productReference = 1343282A1DBE32890000A2DD /* InstagramFeedView.app */;
247 | productType = "com.apple.product-type.application";
248 | };
249 | /* End PBXNativeTarget section */
250 |
251 | /* Begin PBXProject section */
252 | 134328221DBE32890000A2DD /* Project object */ = {
253 | isa = PBXProject;
254 | attributes = {
255 | LastUpgradeCheck = 0800;
256 | ORGANIZATIONNAME = "Sagar Shirbhate";
257 | TargetAttributes = {
258 | 134328291DBE32890000A2DD = {
259 | CreatedOnToolsVersion = 8.0;
260 | DevelopmentTeam = U3M7K6Z7U8;
261 | ProvisioningStyle = Automatic;
262 | };
263 | };
264 | };
265 | buildConfigurationList = 134328251DBE32890000A2DD /* Build configuration list for PBXProject "InstagramFeedView" */;
266 | compatibilityVersion = "Xcode 3.2";
267 | developmentRegion = English;
268 | hasScannedForEncodings = 0;
269 | knownRegions = (
270 | en,
271 | Base,
272 | );
273 | mainGroup = 134328211DBE32890000A2DD;
274 | productRefGroup = 1343282B1DBE32890000A2DD /* Products */;
275 | projectDirPath = "";
276 | projectRoot = "";
277 | targets = (
278 | 134328291DBE32890000A2DD /* InstagramFeedView */,
279 | );
280 | };
281 | /* End PBXProject section */
282 |
283 | /* Begin PBXResourcesBuildPhase section */
284 | 134328281DBE32890000A2DD /* Resources */ = {
285 | isa = PBXResourcesBuildPhase;
286 | buildActionMask = 2147483647;
287 | files = (
288 | 139324071DBE352B00FE8130 /* PostDescription.xib in Resources */,
289 | 132E58F21DBF22F300A85B61 /* SectionHeaderOfPost.xib in Resources */,
290 | 132E58F41DBF3B4000A85B61 /* unnamed.png in Resources */,
291 | 1343283D1DBE32890000A2DD /* LaunchScreen.storyboard in Resources */,
292 | 139324091DBE352B00FE8130 /* PostImage.xib in Resources */,
293 | 1393240D1DBE352B00FE8130 /* SuggestedPeopleCell.xib in Resources */,
294 | 139324051DBE352B00FE8130 /* DetailText.xib in Resources */,
295 | 139324111DBE352B00FE8130 /* TotalLikes_Comments.xib in Resources */,
296 | 1343283A1DBE32890000A2DD /* Assets.xcassets in Resources */,
297 | 134328381DBE32890000A2DD /* Main.storyboard in Resources */,
298 | 139324031DBE352B00FE8130 /* Buttons.xib in Resources */,
299 | 139324131DBE352B00FE8130 /* UploadedOn.xib in Resources */,
300 | 1393240F1DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.xib in Resources */,
301 | );
302 | runOnlyForDeploymentPostprocessing = 0;
303 | };
304 | /* End PBXResourcesBuildPhase section */
305 |
306 | /* Begin PBXSourcesBuildPhase section */
307 | 134328261DBE32890000A2DD /* Sources */ = {
308 | isa = PBXSourcesBuildPhase;
309 | buildActionMask = 2147483647;
310 | files = (
311 | 134328351DBE32890000A2DD /* ViewController.m in Sources */,
312 | 134328321DBE32890000A2DD /* AppDelegate.m in Sources */,
313 | 139324121DBE352B00FE8130 /* UploadedOn.m in Sources */,
314 | 139324061DBE352B00FE8130 /* PostDescription.m in Sources */,
315 | 139324041DBE352B00FE8130 /* DetailText.m in Sources */,
316 | 132E58F11DBF22F300A85B61 /* SectionHeaderOfPost.m in Sources */,
317 | 139324101DBE352B00FE8130 /* TotalLikes_Comments.m in Sources */,
318 | 1343282F1DBE32890000A2DD /* main.m in Sources */,
319 | 1393240C1DBE352B00FE8130 /* SuggestedPeopleCell.m in Sources */,
320 | 1393240E1DBE352B00FE8130 /* SuggestedPeopleCollectionViewCell.m in Sources */,
321 | 139324081DBE352B00FE8130 /* PostImage.m in Sources */,
322 | 139324021DBE352B00FE8130 /* Buttons.m in Sources */,
323 | );
324 | runOnlyForDeploymentPostprocessing = 0;
325 | };
326 | /* End PBXSourcesBuildPhase section */
327 |
328 | /* Begin PBXVariantGroup section */
329 | 134328361DBE32890000A2DD /* Main.storyboard */ = {
330 | isa = PBXVariantGroup;
331 | children = (
332 | 134328371DBE32890000A2DD /* Base */,
333 | );
334 | name = Main.storyboard;
335 | sourceTree = "";
336 | };
337 | 1343283B1DBE32890000A2DD /* LaunchScreen.storyboard */ = {
338 | isa = PBXVariantGroup;
339 | children = (
340 | 1343283C1DBE32890000A2DD /* Base */,
341 | );
342 | name = LaunchScreen.storyboard;
343 | sourceTree = "";
344 | };
345 | /* End PBXVariantGroup section */
346 |
347 | /* Begin XCBuildConfiguration section */
348 | 1343283F1DBE32890000A2DD /* Debug */ = {
349 | isa = XCBuildConfiguration;
350 | buildSettings = {
351 | ALWAYS_SEARCH_USER_PATHS = NO;
352 | CLANG_ANALYZER_NONNULL = YES;
353 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
354 | CLANG_CXX_LIBRARY = "libc++";
355 | CLANG_ENABLE_MODULES = YES;
356 | CLANG_ENABLE_OBJC_ARC = YES;
357 | CLANG_WARN_BOOL_CONVERSION = YES;
358 | CLANG_WARN_CONSTANT_CONVERSION = YES;
359 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
360 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
361 | CLANG_WARN_EMPTY_BODY = YES;
362 | CLANG_WARN_ENUM_CONVERSION = YES;
363 | CLANG_WARN_INFINITE_RECURSION = YES;
364 | CLANG_WARN_INT_CONVERSION = YES;
365 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
366 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
367 | CLANG_WARN_UNREACHABLE_CODE = YES;
368 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
369 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
370 | COPY_PHASE_STRIP = NO;
371 | DEBUG_INFORMATION_FORMAT = dwarf;
372 | ENABLE_STRICT_OBJC_MSGSEND = YES;
373 | ENABLE_TESTABILITY = YES;
374 | GCC_C_LANGUAGE_STANDARD = gnu99;
375 | GCC_DYNAMIC_NO_PIC = NO;
376 | GCC_NO_COMMON_BLOCKS = YES;
377 | GCC_OPTIMIZATION_LEVEL = 0;
378 | GCC_PREPROCESSOR_DEFINITIONS = (
379 | "DEBUG=1",
380 | "$(inherited)",
381 | );
382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
384 | GCC_WARN_UNDECLARED_SELECTOR = YES;
385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
386 | GCC_WARN_UNUSED_FUNCTION = YES;
387 | GCC_WARN_UNUSED_VARIABLE = YES;
388 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
389 | MTL_ENABLE_DEBUG_INFO = YES;
390 | ONLY_ACTIVE_ARCH = YES;
391 | SDKROOT = iphoneos;
392 | TARGETED_DEVICE_FAMILY = "1,2";
393 | };
394 | name = Debug;
395 | };
396 | 134328401DBE32890000A2DD /* Release */ = {
397 | isa = XCBuildConfiguration;
398 | buildSettings = {
399 | ALWAYS_SEARCH_USER_PATHS = NO;
400 | CLANG_ANALYZER_NONNULL = YES;
401 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
402 | CLANG_CXX_LIBRARY = "libc++";
403 | CLANG_ENABLE_MODULES = YES;
404 | CLANG_ENABLE_OBJC_ARC = YES;
405 | CLANG_WARN_BOOL_CONVERSION = YES;
406 | CLANG_WARN_CONSTANT_CONVERSION = YES;
407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
408 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
409 | CLANG_WARN_EMPTY_BODY = YES;
410 | CLANG_WARN_ENUM_CONVERSION = YES;
411 | CLANG_WARN_INFINITE_RECURSION = YES;
412 | CLANG_WARN_INT_CONVERSION = YES;
413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
414 | CLANG_WARN_SUSPICIOUS_MOVES = YES;
415 | CLANG_WARN_UNREACHABLE_CODE = YES;
416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
418 | COPY_PHASE_STRIP = NO;
419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
420 | ENABLE_NS_ASSERTIONS = NO;
421 | ENABLE_STRICT_OBJC_MSGSEND = YES;
422 | GCC_C_LANGUAGE_STANDARD = gnu99;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
426 | GCC_WARN_UNDECLARED_SELECTOR = YES;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
431 | MTL_ENABLE_DEBUG_INFO = NO;
432 | SDKROOT = iphoneos;
433 | TARGETED_DEVICE_FAMILY = "1,2";
434 | VALIDATE_PRODUCT = YES;
435 | };
436 | name = Release;
437 | };
438 | 134328421DBE32890000A2DD /* Debug */ = {
439 | isa = XCBuildConfiguration;
440 | buildSettings = {
441 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
442 | DEVELOPMENT_TEAM = U3M7K6Z7U8;
443 | INFOPLIST_FILE = InstagramFeedView/Info.plist;
444 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
445 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
446 | PRODUCT_BUNDLE_IDENTIFIER = com.bits.dev.InstagramFeedView;
447 | PRODUCT_NAME = "$(TARGET_NAME)";
448 | };
449 | name = Debug;
450 | };
451 | 134328431DBE32890000A2DD /* Release */ = {
452 | isa = XCBuildConfiguration;
453 | buildSettings = {
454 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
455 | DEVELOPMENT_TEAM = U3M7K6Z7U8;
456 | INFOPLIST_FILE = InstagramFeedView/Info.plist;
457 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
458 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
459 | PRODUCT_BUNDLE_IDENTIFIER = com.bits.dev.InstagramFeedView;
460 | PRODUCT_NAME = "$(TARGET_NAME)";
461 | };
462 | name = Release;
463 | };
464 | /* End XCBuildConfiguration section */
465 |
466 | /* Begin XCConfigurationList section */
467 | 134328251DBE32890000A2DD /* Build configuration list for PBXProject "InstagramFeedView" */ = {
468 | isa = XCConfigurationList;
469 | buildConfigurations = (
470 | 1343283F1DBE32890000A2DD /* Debug */,
471 | 134328401DBE32890000A2DD /* Release */,
472 | );
473 | defaultConfigurationIsVisible = 0;
474 | defaultConfigurationName = Release;
475 | };
476 | 134328411DBE32890000A2DD /* Build configuration list for PBXNativeTarget "InstagramFeedView" */ = {
477 | isa = XCConfigurationList;
478 | buildConfigurations = (
479 | 134328421DBE32890000A2DD /* Debug */,
480 | 134328431DBE32890000A2DD /* Release */,
481 | );
482 | defaultConfigurationIsVisible = 0;
483 | defaultConfigurationName = Release;
484 | };
485 | /* End XCConfigurationList section */
486 | };
487 | rootObject = 134328221DBE32890000A2DD /* Project object */;
488 | }
489 |
--------------------------------------------------------------------------------