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
// | |
// TumblrCheckViewController.m | |
// TumblrCheck | |
// | |
// Created by Alexandru Ciocea on 11.04.13. | |
// Copyright (c) 2013 ImprovingSkills. All rights reserved. | |
// | |
#define kAsyncModus dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
#define kTumblURL [NSURL URLWithString: @"http://trainbrainstorm.tumblr.com/api/read/json"] | |
#define kAnotherURL [NSURL URLWithString: @"http://api.kivaws.org/v1/loans/search.json?status=fundraising"] |
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
Advanced Sample Project | |
------------------------------ | |
https://developer.apple.com/library/ios/#samplecode/AdvancedTableViewCells/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009111 | |
AdvancedTableViewCells includes three different cells that all display content in the same form as the App Store application. One uses individual subviews (image views, labels, etc.) to display the content. Another uses a single view that draws all of the content. A third uses a single view to draw most of the content and separate views for the remainder. | |
International Mountains | |
------------------------------ |
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
In Klasse die das delegate erhalten soll: | |
@protocol CustomAlertDelegate <NSObject> | |
-(void)dismissMyViewController:(UIViewController *)aViewController; | |
@end | |
define the delegate property: |
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
int count = 0; | |
for(UIView *v in [actualView subviews]){ | |
if([v isMemberOfClass:[UIView class]]){ | |
NSLog(@"Aktual View %d: %@", count, v); | |
count++; | |
} | |
} | |
- (void)printMyFrame:(CGRect)aFrame{ |
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
check if device is jailbraiked | |
(Not all users have installed Cydia, maybe check any root dir outside the sandbox -->/bin/usr) | |
------------------------------ | |
NSString *filePath = @"/Applications/Cydia.app"; | |
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) | |
{ | |
// do something useful | |
} |
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
say -v 'pipe organ' Dum dum dee dum dum dum dum dee Dum dum dee dum dum dum dum dee dum dee dum dum dum de dum dum dum dee dum dee dum dum dee dummmmmmmmmmmmmmmmm | |
osascript -e 'say "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo" using "Cellos"' | |
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
Using different methods for seeding srand() | |
from post: http://stackoverflow.com/a/6864328/1141395 | |
time of the day, returns number of seconds elapsed since midnight January 1st, 1970 | |
----------------------------------------------------------------------------------- | |
time(NULL); | |
$(ARCHS_STANDARD_INCLUDING_64_BIT) | |
where to find xCode Snippets | |
---------------------------- |
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
-f file, --input-file=file | |
Specify a file to be spoken. If file is - or neither this parameter nor a message is specified, read from standard | |
input. | |
--progress | |
Display a progress meter during synthesis. | |
-v voice, --voice=voice | |
Specify the voice to be used. Default is the voice selected in System Preferences. To obtain a list of voices | |
installed in the system, specify '?' as the voice name. |
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
delete separators after last row | |
-------------------------------- | |
self.tableView.tableFooterView = [[UIView alloc] init]; | |
delete last separator line of tableview | |
--------------------------------------- | |
if( indexPath.row == _arrayMenu.count - 1 ){ |
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
// replace chars | |
validDeviceToken = [validDeviceToken stringByReplacingOccurrencesOfString:@"<" withString:@""]; | |
Cut whitespaces from string | |
--------------------------- | |
[myString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; | |
Extensions for Categories | |
__________________________ |
OlderNewer