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
CellSize size; | |
if (_list) { | |
size = CellSizeList; | |
} | |
else{ | |
//TODO: Factorize landscape/portrait code | |
//Randomize cell size and avoid hole | |
if (UIDeviceOrientationIsPortrait([[UIDevice currentDevice]orientation])) { | |
if (_currentRowStatus == CellRowEmpty || | |
_currentRowStatus == CellRowOneSpaceUsed) { |
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
typedef enum { | |
MSFlowControllerOffsetMyProfile = 0, | |
MSFlowControllerOffsetMySeeen, | |
MSFlowControllerOffsetTimeline, | |
MSFlowControllerOffsetNotification, | |
MSFlowControllerOffsetFriends, | |
MSFlowControllerOffsetRecommandation, | |
MSFlowControllerOffsetSettings, | |
MSFlowControllerTotalOffsets | |
} MSFlowControllerOffset; |
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
timeout = setTimeout('$.fn.bar.removebar()',o.time); | |
var _message_span = $(document.createElement('span')).addClass('jbar-content').html(o.message); | |
_message_span.css({"color" : o.color}); | |
var _wrap_bar; | |
(o.position == 'bottom') ? | |
_wrap_bar = $(document.createElement('div')).addClass('jbar jbar-bottom'): | |
_wrap_bar = $(document.createElement('div')).addClass('jbar jbar-top') ; | |
_wrap_bar.css({"background-color" : o.background_color}); |
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
#!/bin/bash | |
# | |
# @(#) Increment the version number in the project plist. V1.2. | |
# Note: The project plist could be in directory | |
# "Resources" or the project root. | |
# Personally, I avoid clutter in the project root. | |
# | |
# Note: This script should be invoked from the project root! | |
# | |
# V1.2 Added checking for the INFOPLIST_FILE environment variable |
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
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init]; | |
[refreshControl addTarget:self action:@selector(startRefresh:) forControlEvents:UIControlEventValueChanged]; | |
[self.collectionView addSubview:refreshControl]; |
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
2013-06-05 17:44:47.135 MySeeenV2[25138:c07] --Begin main controller init-- | |
2013-06-05 17:44:47.135 MySeeenV2[25138:c07] --Begin DMRESTRequest configuration-- | |
2013-06-05 17:44:47.136 MySeeenV2[25138:c07] token found, set it to DMRESTSettings token field | |
2013-06-05 17:44:47.136 MySeeenV2[25138:c07] --Done DMRESTRequest configuration-- | |
2013-06-05 17:44:47.136 MySeeenV2[25138:c07] --Start looking for current user-- | |
2013-06-05 17:44:47.138 MySeeenV2[25138:c07] Fetched current user from core data | |
2013-06-05 17:44:47.138 MySeeenV2[25138:c07] --Done looking for current user-- | |
2013-06-05 17:44:47.139 MySeeenV2[25138:c07] --Begin set current user-- | |
2013-06-05 17:44:47.139 MySeeenV2[25138:c07] Passed current user is not nil, adding observer | |
2013-06-05 17:44:47.141 MySeeenV2[25138:c07] Received notificaiton: updatr inbox alert number |
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
2013-06-05 17:57:46.050 MySeeenV2[29270:c07] --Begin main controller init-- | |
2013-06-05 17:57:46.050 MySeeenV2[29270:c07] --Begin DMRESTRequest configuration-- | |
2013-06-05 17:57:46.050 MySeeenV2[29270:c07] --Done DMRESTRequest configuration-- | |
2013-06-05 17:57:46.051 MySeeenV2[29270:c07] --Start looking for current user-- | |
2013-06-05 17:57:46.051 MySeeenV2[29270:c07] --Done looking for current user, no current user-- | |
2013-06-05 17:57:46.051 MySeeenV2[29270:c07] --Begin set current user-- | |
2013-06-05 17:57:46.052 MySeeenV2[29270:c07] Passed current user is nil, removing observer | |
2013-06-05 17:57:46.052 MySeeenV2[29270:c07] --Done set current user-- | |
2013-06-05 17:57:46.054 MySeeenV2[29270:c07] --Done main controller init-- | |
2013-06-05 17:57:46.055 MySeeenV2[29270:c07] --Start init Root View Controller (MMDrawer)-- |
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
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init]; | |
NSTextContainer *container = [[NSTextContainer alloc] initWithSize:CGSizeMake(newTextViewRect.size.width, CGFLOAT_MAX)]; | |
container.widthTracksTextView = YES; | |
[layoutManager addTextContainer:container]; | |
[_textStorage addLayoutManager:layoutManager]; | |
UITextView *newTextView = [[UITextView alloc] initWithFrame:newTextViewRect textContainer:container]; | |
newTextView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; | |
newTextView.scrollEnabled = YES; |
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 <QuartzCore/QuartzCore.h> | |
#import "PHBallChainViewController.h" | |
@interface PHBallChainViewController () | |
@property (nonatomic) UIDynamicAnimator* animator; | |
@property (nonatomic, weak) UIView *ballView; | |
@property (nonatomic) UIAttachmentBehavior* touchAttachmentBehavior; | |
@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
// Create a configuration object | |
NSURLSessionConfiguration* config = [NSURLSessionConfiguration defaultConfiguration]; | |
// Configure it to disallow cellular access (for instance) | |
config.allowsCellularAccess = NO | |
// Create a session | |
NSURLSession* mySession = [NSURLSession sessionWithConfiguration:config]; | |
// Fetch |