Skip to content

Instantly share code, notes, and snippets.

View DougFischer's full-sized avatar

Douglas Fischer DougFischer

View GitHub Profile
@DougFischer
DougFischer / SubtrateUncomparablePointsRESULT_DATA
Last active December 29, 2015 09:48
SubtrateUncomparablePointsRESULT_DATA
Printing description of dictionaryWithValuesByKeys:
{
DOLARC = (
"IDX: DOLARC | Date: 28 | Value: 2.18",
"IDX: DOLARC | Date: 29 | Value: 2.18",
"IDX: DOLARC | Date: 30 | Value: 2.19",
"IDX: DOLARC | Date: 31 | Value: 2.20",
"IDX: DOLARC | Date: 1 | Value: 2.25",
"IDX: DOLARC | Date: 4 | Value: 2.24",
"IDX: DOLARC | Date: 5 | Value: 2.27",
//ANTES
DOLARC = (
"IDX: DOLARC | Date: 28 | Value: 2.18",
"IDX: DOLARC | Date: 29 | Value: 2.18",
"IDX: DOLARC | Date: 30 | Value: 2.19",
"IDX: DOLARC | Date: 31 | Value: 2.20",
"IDX: DOLARC | Date: 1 | Value: 2.25",
"IDX: DOLARC | Date: 4 | Value: 2.24",
"IDX: DOLARC | Date: 5 | Value: 2.27",
@DougFischer
DougFischer / GiveMyModalsOrientationsBack
Created October 9, 2013 05:09
On iOS6+, the orientation of modal view controllers is handled by the view controller who present them. If you're using UITabBarController, it can be a little confusing, since you need to add presenting view controller some code to handle the modal controller's visibility. This code snippet shows how to have all UIViewControllers orientations (p…
#pragma mark -
#pragma mark UIApplication Delegate
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)pWindow {
UITabBarController *tabCtrl = (UITabBarController *)self.window.rootViewController;
//Check if there's a modal view controller on screen (dismissing modal view controllers are ignored)
if (tabCtrl.selectedViewController.presentedViewController && !tabCtrl.selectedViewController.presentedViewController.isBeingDismissed) {
return tabCtrl.selectedViewController.presentedViewController.supportedInterfaceOrientations;
}