Skip to content

Instantly share code, notes, and snippets.

View serhatsezer's full-sized avatar
🎯
Focusing

Serhat Sezer serhatsezer

🎯
Focusing
View GitHub Profile
@serhatsezer
serhatsezer / TableViewSample
Last active August 29, 2015 14:08
Tableview insert new row
//
// TableViewController.m
// tabbar_sample
//
// Created by Serhat Sezer on 24/10/14.
// Copyright (c) 2014 SecretCV. All rights reserved.
//
#import "TableViewController.h"
package com.secretcv;
import se.emilsjolander.stickylistheaders.StickyListHeadersAdapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
package com.secretcv;
import se.emilsjolander.stickylistheaders.StickyListHeadersListView;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class JobDetailActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
[[TRUNetworkManager sharedInstance].webService getTransaction:self.transactionId completion:^(NSArray *result, BOOL handleError, NSError *error) {
if(!result)
self.collectionData = result[0];
dispatch_async(dispatch_get_main_queue(), ^{
[self.tableView reloadSections:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 4)] withRowAnimation:UITableViewRowAnimationAutomatic];
});
}
@serhatsezer
serhatsezer / gist:e4be0d635aa278a5ca51
Last active August 29, 2015 14:16
Pop to specific ViewController in NavigationController
// Navigation Stack -> (pushed)
// Steps 1. AViewController -> 2. BViewController -> 3. CViewController
// in the CViewController user tapped button -> -backToFirstViewController
// backToFirstViewController
- (void)backToFirstViewController {
// get navigation stack as an array.
NSArray *viewControllers = self.navigationController.viewControllers;
@serhatsezer
serhatsezer / gist:1361536cd27d0449a574
Created March 24, 2015 12:21
UITableview lazy cell instatiation
@interface UserDetailViewController()
@property(strong, nonatomic) MyCustomCell *customCell;
@end
@implementation UserDetailViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Load Xib file...
//
// iCarouselExampleViewController.m
// iCarouselExample
//
// Created by Nick Lockwood on 03/04/2011.
// Copyright 2011 Charcoal Design. All rights reserved.
//
#import "iCarouselExampleViewController.h"
#import "TableViewController.h"
@serhatsezer
serhatsezer / gist:77b44e96f84ec0689202
Created June 24, 2015 16:03
added table view controller as a child view controller and returned their views.
- (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSInteger)index reusingView:(UIView *)view
{
self.customTableViewController = [[STableViewController alloc] init];
[self addChildViewController:self.customTableViewController];
[self.customTableViewController didMoveToParentViewController:self];
self.customTableViewController.tableView.frame = CGRectMake(0, 0, 200, 200);
return self.customTableViewController.tableView;
}
@serhatsezer
serhatsezer / gist:0ad0f1364af4b08ec07e
Created June 30, 2015 09:06
icarousel implementation file
- (void)configureContainers
{
_containerRect = CGRectMake(0.0f, 0.0f, CGRectGetWidth(self.view.bounds), self.tabBarHeight);
// Tabbar container view
_tabButtonsContainerView = [[UIView alloc] initWithFrame:_containerRect];
_tabButtonsContainerView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
_tabButtonsContainerView.backgroundColor = [UIColor colorWithWhite:1.0f alpha:0.8f];
{
ShowInternAds = 0;
appliedJobIds = "1405940,1233893";
cityIds = 68;
countryIds = "<null>";
education = D;
experienceMax = 10;
experienceMin = "<null>";
firmName = "<null>";
gender = B;