I hereby claim:
- I am scheinem on github.
- I am scheinem (https://keybase.io/scheinem) on keybase.
- I have a public key whose fingerprint is F195 B2DD EF89 2479 C2F1 473E B9D6 5529 C29B 0F43
To claim this, I am signing this object:
#!/bin/bash | |
OLD_IFS=$IFS | |
IFS=$'\n' | |
databases=( $(find ~/Library/Application\ Support/AddressBook -name "*.abcddb") ) | |
for database in ${databases[*]} | |
do | |
echo "Database: $database" | |
mailAddressesString=$(sqlite3 $database "SELECT ZADDRESS FROM ZABCDEMAILADDRESS;") |
1. Unzip <File>.ipa | |
2. cd into the <File>.app inside the unzipped .ipa (= Payload Folder) | |
3. /usr/bin/security cms -D -i embedded.mobileprovision > ../Entitlements.plist (= Place the Entitlements next to <File>.app) | |
4. Remove outer dict only leaving inner dict „Entitlements“ in Entitlements.plist (also remove the "<key>Entitlements</key>") | |
5. Delete Folder "_CodeSignature" in <File>.app, in contained "Framework" folder and all .framework folders | |
6. Delete all .mobileprovision files in <File>.app, in contained "Framework" folder and all .framework folders | |
7. Add your <New>.mobileprovision as embedded.mobileprovision to <File>.app/ | |
8. cd to location where Entitlements.plist and <File>.app are located | |
9. For each .framework and each .dylib: codesign -f -v -s "<Certificate Name>" --entitlements Entitlements.plist <fremworkOrDylibFile> | |
10. codesign -f -v -s "<Certificate Name>" --entitlements Entitlements.plist <File>.app |
/** | |
* Is this a bug or is this the way as it is designed by Apple? | |
* I can't think that this isn't a bug but who knows... | |
*/ | |
var str = "\r\n" | |
countElements(str) // Returns 1 | |
(str as NSString).length // Returns 2 |
I hereby claim:
To claim this, I am signing this object:
// Execute the following code somewhere in your app | |
UIToolbar *datePickerToolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0.f, 50.f, self.window.bounds.size.width, 44.f)]; | |
UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; | |
UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStylePlain target:self action:nil]; | |
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"OK" style:UIBarButtonItemStyleDone target:self action:nil]; | |
datePickerToolbar.items = @[cancelButton, flexibleSpace, doneButton]; | |
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) { | |
// show UIActionSheet | |
}]; | |
moreAction.backgroundColor = [UIColor greenColor]; | |
UITableViewRowAction *flagAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Flag" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) { | |
// flag the row | |
}]; |
// First run: | |
CGRect testRect = CGRectMake(0.f, 0.f, 320.f, 215.5f); | |
testRect = CGRectIntegral(CGRectInset(testRect, 15.f, 0.f)); | |
// RESULT: testRect = (15 0; 290 216); | |
self.datePicker.frame = testRect; | |
// RESULT: self.datePicker.frame = (15 0; 290 216); | |
// Second run: |
if ([[UIDevice currentDevice] supportsTouchID]) { | |
[[UIDevice currentDevice] authenticateUsingTouchIDWithMessage:@"Authenticate to allow 'Hello World' to use the password you've entered at first launch" completionHandler:^(BOOL success){}]; | |
} |
/** | |
* Detects paragraphs in an UITextView and stores it in an NSMutableArray called "paragraphs" | |
* | |
* Author: Manfred Scheiner (@scheinem) | |
* Created on 03.07.2013 | |
*/ | |
- (void)textViewDidChange:(UITextView *)textView; { | |
NSMutableArray *paragraphs = [NSMutableArray array]; | |
for (NSString *component in [textView.text componentsSeparatedByString:@"\n"]) { |