Skip to content

Instantly share code, notes, and snippets.

Ahmet Ardal ardalahmet

View GitHub Profile
View Cocoapods_post_install_example.rb
post_install do |installer|
installer.pods_project.targets.each do |target|
puts target.name
target.build_configurations.each do |config|
next unless config.name == 'Debug'
puts config.name
puts config.build_settings['LD_RUNPATH_SEARCH_PATHS']
puts "------------\n"
end
end
View SSCheckBoxViewDemo_create.m
- (void) viewDidLoad
{
[super viewDidLoad];
SSCheckBoxView *cbv = [[SSCheckBoxView alloc] initWithFrame:CGRectMake(20, 20, 200, 30)
style:kSSCheckBoxViewStyleGlossy
checked:YES];
[cbv setText:@"Check updates?"];
[self.view addSubview:cbv];
[cbv release];
@ardalahmet
ardalahmet / SSPhotoCropperDelegate.m
Created Oct 17, 2011
SSPhotoCropperViewController
View SSPhotoCropperDelegate.m
@protocol SSPhotoCropperDelegate<NSObject>
@optional
- (void) photoCropper:(SSPhotoCropperViewController *)photoCropper
didCropPhoto:(UIImage *)photo;
- (void) photoCropperDidCancel:(SSPhotoCropperViewController *)photoCropper;
@end
View UIWebViewHttpStatusCodeHandling_checksession.m
#pragma mark -
#pragma mark UIWebViewDelegate Methods
- (BOOL) webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType
{
if (_sessionChecked) {
[self log:@"session already checked."];
return YES;
View EmailableCellDemo-create.m
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellId = @"EmailableCell";
EmailableCell *cell = (EmailableCell *) [tableView dequeueReusableCellWithIdentifier:cellId];
if (cell == nil) {
cell = [[[EmailableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId] autorelease];
}
[cell setIndexPath:indexPath];
[cell setDelegate:self];
View CopyableCellDemo-create.m
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellId = @"CopyableCell";
CopyableCell *cell = (CopyableCell *) [tableView dequeueReusableCellWithIdentifier:cellId];
if (cell == nil) {
cell = [[[CopyableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId] autorelease];
}
[cell setIndexPath:indexPath];
[cell setDelegate:self];
View initializing_animation_timers.m
- (void) initializeTimerWithNSTimer
{
CGFloat interval = 1.0f / 50.0f;
[NSTimer scheduledTimerWithTimeInterval:interval
target:self
selector:@selector(animateBallNSTimer:)
userInfo:nil
repeats:YES];
}
View UINavigationBar+CustomBackground.h
//
// UINavigationBar+CustomBackground.h
// CustomizingNavigationBarBackground
//
// Created by Ahmet Ardal on 2/10/11.
// Copyright 2011 LiveGO. All rights reserved.
//
#import <Foundation/Foundation.h>
View AsyncImageLoadingViewController_p1.m
/*!
@method
@abstract adds images to the queue and starts the operation queue to download them
*/
- (void) addImagesToQueue:(NSArray *)images
{
NSLog(@"AsyncImageLoadingViewController::addImagesToQueue called");
[self.imageQueue addObjectsFromArray:images];
You can’t perform that action at this time.