This file contains 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
searchBar.backgroundImage = UIImage() | |
searchBar.tintAdjustmentMode = UIViewTintAdjustmentMode.Normal | |
searchBar.barTintColor = Utils.tintColor() //Your desired tint color |
This file contains 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
@implementation NXAssetReaderManager | |
@synthesize assetReaders = _assetReaders; | |
+ (id)sharedManager { | |
static NXAssetReaderManager *sharedMyManager = nil; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
sharedMyManager = [[self alloc] init]; | |
}); | |
return sharedMyManager; | |
} |
This file contains 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) readNextMovieFrame | |
{ | |
AVAssetReaderTrackOutput * output = [_movieReader.outputs objectAtIndex:0]; | |
CMSampleBufferRef sampleBuffer = [output copyNextSampleBuffer]; | |
if (sampleBuffer) | |
{ | |
CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer); | |
This file contains 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 SubedViewController :UIViewController | |
#import "UIViewController+TutorialView.h" | |
@implementation SubedViewController | |
-(void)removeTutorialImage { | |
if (imageContainer){ | |
[imageContainer removeFromSuperview]; | |
imageContainer = nil; |
This file contains 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 "UIViewController+something.h" | |
UINavigationController *previousViewController = (UINavigationController*)self.selectedViewController; | |
if ([previousViewController isTutorialOn]) { | |
[[previousViewController visibleViewController] removeTutorialImage]; | |
} |
This file contains 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)initalizeForSender { | |
OSStatus status; | |
// We define the audio component | |
AudioComponentDescription desc; | |
desc.componentType = kAudioUnitType_Output; // we want to ouput | |
desc.componentSubType = kAudioUnitSubType_RemoteIO; // we want in and ouput | |
desc.componentFlags = 0; // must be zero | |
desc.componentFlagsMask = 0; // must be zero |
This file contains 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
const int ChannelCount = 1; | |
const int BitsPerSample = 2; | |
const int BufferSamples = 16; // can be changed | |
const int BufferSize = 4096; //same as max buffer for iOS and Android | |
protected override void OpenMediaAsync() | |
{ | |
int byteRate = sampleRate * ChannelCount * BitsPerSample / 8; | |
Debug.WriteLine("ByteRate: "+byteRate); | |
short blockAlign = (short)(ChannelCount * (BitsPerSample / 8)); |
This file contains 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
//sender | |
NSData *data2 = [self createRandomNSData:8192]; | |
NSMutableData *dataToSend =[NSMutableData data]; | |
[dataToSend appendBytes:&tag length:sizeof(int)]; | |
float currentTimeStamp = CACurrentMediaTime(); | |
[dataToSend appendBytes:¤tTimeStamp length:sizeof(float)]; | |
[dataToSend appendData:data2]; | |
NSLog(@"%i || %f || %lu",tag, currentTimeStamp,(unsigned long)[dataToSend length]); | |
[_udpSocket sendData:dataToSend toHost:@"230.0.0.1" port:_port withTimeout:-1 tag:tag]; |
This file contains 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-12-23 13:23:40:936 TravelApp[699:60b] GCDAsyncUdpSocket: initWithDelegate:delegateQueue: | |
2013-12-23 13:23:40:937 TravelApp[699:60b] GCDAsyncUdpSocket: initWithDelegate:delegateQueue:socketQueue: | |
2013-12-23 13:23:40:938 TravelApp[699:60b] GCDAsyncUdpSocket: createSocket4:socket6:error: | |
2013-12-23 13:23:40:939 TravelApp[699:60b] GCDAsyncUdpSocket: Creating IPv4 socket | |
2013-12-23 13:23:40:939 TravelApp[699:60b] GCDAsyncUdpSocket: Creating IPv6 socket | |
2013-12-23 13:23:40:940 TravelApp[699:60b] GCDAsyncUdpSocket: setupSendAndReceiveSourcesForSocket4 | |
2013-12-23 13:23:40:940 TravelApp[699:60b] GCDAsyncUdpSocket: setupSendAndReceiveSourcesForSocket6 | |
2013-12-23 13:23:40:941 TravelApp[699:60b] GCDAsyncUdpSocket: Binding socket to port(4444) interface((null)) | |
2013-12-23 13:23:40:941 TravelApp[699:60b] GCDAsyncUdpSocket: dispatch_source_cancel(send6Source) | |
2013-12-23 13:23:40:941 TravelApp[699:60b] GCDAsyncUdpSocket: dispatch_source_cancel(receive6Source) |
This file contains 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-12-23 13:20:24:055 TravelApp[684:60b] GCDAsyncUdpSocket: initWithDelegate:delegateQueue: | |
2013-12-23 13:20:24:056 TravelApp[684:60b] GCDAsyncUdpSocket: initWithDelegate:delegateQueue:socketQueue: | |
2013-12-23 13:20:24:057 TravelApp[684:60b] GCDAsyncUdpSocket: createSocket4:socket6:error: | |
2013-12-23 13:20:24:058 TravelApp[684:60b] GCDAsyncUdpSocket: Creating IPv4 socket | |
2013-12-23 13:20:24:058 TravelApp[684:60b] GCDAsyncUdpSocket: Creating IPv6 socket | |
2013-12-23 13:20:24:059 TravelApp[684:60b] GCDAsyncUdpSocket: setupSendAndReceiveSourcesForSocket4 | |
2013-12-23 13:20:24:059 TravelApp[684:60b] GCDAsyncUdpSocket: setupSendAndReceiveSourcesForSocket6 | |
2013-12-23 13:20:24:059 TravelApp[684:60b] GCDAsyncUdpSocket: Binding socket to port(4444) interface((null)) | |
2013-12-23 13:20:24:060 TravelApp[684:60b] GCDAsyncUdpSocket: dispatch_source_cancel(send6Source) | |
2013-12-23 13:20:24:060 TravelApp[684:60b] GCDAsyncUdpSocket: dispatch_source_cancel(receive6Source) |
OlderNewer