Created
April 29, 2014 21:49
-
-
Save mnmaraes/3dfae9ed353fe49e9d0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TUITestTableViewController.m | |
// TestUIs | |
// | |
// Created by Murillo Nicacio de Maraes on 4/29/14. | |
// Copyright (c) 2014 m-one. All rights reserved. | |
// | |
#import "TUITestTableViewController.h" | |
@interface TUITestTableViewController () <UIScrollViewDelegate> | |
@property (nonatomic) UIView *unmovingView; | |
@end | |
@implementation TUITestTableViewController | |
- (id)initWithStyle:(UITableViewStyle)style | |
{ | |
self = [super initWithStyle:style]; | |
if (self) { | |
// Custom initialization | |
} | |
return self; | |
} | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
self.unmovingView = [[UIView alloc] initWithFrame:CGRectMake(20, 80, 280, 300)]; | |
self.unmovingView.backgroundColor = [UIColor blueColor]; | |
[self.tableView addSubview:self.unmovingView]; | |
self.tableView.delegate = self; | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
} | |
#pragma mark - Table view data source | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
return 1; | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section | |
{ | |
return 30; | |
} | |
-(void)scrollViewDidScroll:(UIScrollView *)scrollView | |
{ | |
self.unmovingView.frame = CGRectMake(20, 80 + scrollView.contentOffset.y, 280, 300); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment