Skip to content

Instantly share code, notes, and snippets.

typedef enum : uint32_t {
/* Typeface info (lower 16 bits of UIFontDescriptorSymbolicTraits) */
UIFontDescriptorTraitItalic = 1u << 0,
UIFontDescriptorTraitBold = 1u << 1,
UIFontDescriptorTraitExpanded = 1u << 5,
UIFontDescriptorTraitCondensed = 1u << 6,
UIFontDescriptorTraitMonoSpace = 1u << 10,
UIFontDescriptorTraitVertical = 1u << 11,
UIFontDescriptorTraitUIOptimized = 1u << 12,
UIFontDescriptorTraitTightLeading = 1u << 15,
typedef enum : uint32_t {
/* Typeface info (lower 16 bits of UIFontDescriptorSymbolicTraits) */
UIFontDescriptorTraitItalic = 1u << 0,
UIFontDescriptorTraitBold = 1u << 1,
UIFontDescriptorTraitExpanded = 1u << 5,
UIFontDescriptorTraitCondensed = 1u << 6,
UIFontDescriptorTraitMonoSpace = 1u << 10,
UIFontDescriptorTraitVertical = 1u << 11,
UIFontDescriptorTraitUIOptimized = 1u << 12,
UIFontDescriptorTraitTightLeading = 1u << 15,
ot@raspberrypi:~# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.12 running, accepting connections
[1] Thread 1 started
[1] cap.driver: "spca561"
[0] motion-httpd: waiting for data on port TCP 8080
[1] cap.card: "Camera"
id cardObject = [nsArrayThatImSureHaveOnlyCardOBject firstObject];
if([cardObject isKindOfClasss:[CardObject class]]) {
CardObject* castedCardObject = (CardObject *)cardObject; // Cast it ONLY FOR compiler and for hints in xcode.
/* following code, using CardObject instance methods, sure (sure more) that object could answer to that message */
}
// THIS IS IN ONE FILE
@interface Parent : NSString
@end
@implementation Parent
- (void) makeIce { // so this is anyway public ? Right ?
NSLog(@"I do ice");
}
@end
// THIS IS IN ONE FILE
@interface Parent : NSString
@end
@implementation Parent
- (void) makeIce { // so this is anyway public ? Right ?
NSLog(@"I do ice");
}
@end
NSString *s = @"xyz";
if([s isMemberOfClass:[NSString class]]) {
NSLog(@"s i just NSString, it is not derivative of NSString, it is juts NSString");
} else {
NSLog(@"It is not");
}
NSString *s = @"xyz";
if([s isMemberOfClass:[NSString class]]) {
NSLog(@"It is NSString or it's derivative");
} else {
NSLog(@"It is not");
}
#import <Foundation/Foundation.h>
@interface Vehicle : NSObject
- (void) move;
@end;
@implementation Vehicle
- (void) move {
NSLog(@"I move");
//
// main.m
// NilTestCount
//
// Created by Paweł on 16/12/13.
// Copyright (c) 2013 Twigit. All rights reserved.
//
#import <Foundation/Foundation.h>