Skip to content

Instantly share code, notes, and snippets.

@dutran90
dutran90 / CocoaPods
Last active August 19, 2016 14:57
CocoaPods
1) Open terminal
2) $ sudo gem install cocoapods (gem will get installed in Ruby inside System library)
3)pod setup
4) create a xcode project
5) cd "$ path to your project root directory" (cd /Volumes/...)
6) pod init
7) open -a Xcode Podfile (podfile will get open in text mode. Initially it will be emppty put the follwoing line of code.)
8) pod 'AFNetworking', '0.9.1' (It’s finally time to add your first dependency using CocoaPods! Copy and paste the following into your pod file, right after target "AFNetworkingProject" do:)
9) pod install
Make sure you run “$ pod install” command every time you add or delete a new library to the Podfile.
@dutran90
dutran90 / UITableView.txt
Last active August 30, 2015 04:52
UITableVIew
#pragma mark - UITableView Datasource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 5;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"ClubCell";
ClubCell *cell = (ClubCell*) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];