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
- (void) flipToGameScreen:(NSInteger *)aMode aLevel:(NSInteger*)aLevel | |
{ | |
//NSInteger *myMode = aMode; you don't need to do this... you can just directly use aLevel and aMode | |
//NSInteger *myLevel = aLevel; | |
GameScreenViewController *aGameScreenView = [[GameScreenViewController alloc] initWithNibName:@"GameScreen" mode:aMode level:aLevel bundle:nil]; | |
[self setGameScreenViewController:aGameScreenView]; | |
[aGameScreenView release]; | |
gameScreenViewController.view.frame =[[UIScreen mainScreen] applicationFrame]; |
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
#import <Foundation/Foundation.h> | |
typedef enum { | |
kRotationDayA, | |
kRotationDayB, | |
kRotationDayC, | |
kRotationDayD, | |
kRotationDayE, | |
kRotationDayF, | |
kRotationDayG |
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
#import <Foundation/Foundation.h> | |
typedef enum { | |
kRotationDayA = 1, | |
kRotationDayB, | |
kRotationDayC, | |
kRotationDayD, | |
kRotationDayE, | |
kRotationDayF, | |
kRotationDayG |
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
@interface MyObject : NSObject | |
@property (nonatomic, strong) NSMutableArray *myArray; | |
+ (MyObject *)sharedInstance; | |
@end |
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
NSString *currentChromosome = @"18"; | |
NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Gene"]; | |
NSSortDescriptor *alphaSortNameDescriptor = [[NSSortDescriptor alloc] initWithKey:@"acronym" ascending:YES]; | |
NSArray *sortDescriptors = [NSArray arrayWithObject:alphaSortNameDescriptor]; | |
[fetchRequest setSortDescriptors:sortDescriptors]; | |
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"chromosome.identity = %@", currentChromosome]; | |
[fetchRequest setPredicate:predicate]; | |
NSError *fetchError = nil; | |
NSArray *genes = [[[DataManager sharedInstance] mainObjectContext] executeFetchRequest:fetchRequest error:&fetchError]; | |
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
23-May-2012 08:52 PM Jack Lawrence: | |
Summary: | |
In iOS 5, the behavior of a UISplitViewController was changed such that instead of displaying a UIPopoverController in portrait orientation, the master view is "slid" like a drawer out from the left side of the display to cover a portion of the detail view. Appropriate callback methods have not been implemented to notify the delegate (in this case, the detail view controller) when the master controller was presented/will be presented/was dismissed/will be dismissed, where as they do exist (somewhat) for the UIPopoverController version in iOS 4. | |
You can see most obviously for the case of was presented/will be presented, the protocol only talks specifically about UIPopoverController objects so off the bat you can see that UIKit is missing some stuff. Furthermore, the documentation surrounding UISplitViewController hasn't been updated to reflect the fact that UIPopoverControllers are no longer used. | |
Steps to Reproduce: | |
In a detail view controller that conforms to U |
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
// | |
// JLNetworkActivityIndicatorManager.h | |
// EcoCr | |
// | |
// Created by Jack Lawrence on 6/27/12. | |
// | |
// | |
#import <Foundation/Foundation.h> |
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
// only class types: | |
func myCast<MyClass: AnyObject>(value: AnyObject, type: MyClass.Type) -> MyClass? { | |
return value as? MyClass | |
} | |
// any type (class, struct, etc): | |
func myCast1<MyClass: Any>(value: Any, type: MyClass.Type) -> MyClass? { | |
return value as? MyClass |
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
import SwiftUI | |
import Combine | |
class MyDatabase: BindableObject { | |
let didChange = PassthroughSubject<MyDatabase, Never>() | |
var contacts: [Contact] = [ | |
Contact(id: 1, name: "Anna"), Contact(id: 2, name: "Beto"), | |
Contact(id: 3, name: "Jack"), Contact(id: 4, name: "Sam") | |
] { |