NSlogging and NSString Conundrum
Date : March 29 2020, 07:55 AM
hop of those help? Here is a sample NSLog after pushing the first cell, then the second (ignore the nil view controller log, I think it's a bug. Also, the down Log is from a private method in the second view, so it can also be ignored. And a bonus to those who can resolve the CGContextClipToRect: invalid context 0x0 warning) musicInteractionController = [[xSheetMusicViewController alloc]init];
|
Category for simplified NSLogging of BOOLs
Date : March 29 2020, 07:55 AM
may help you . If you need it decoupled from any particular class, using the preprocessor and C is your best bet. Something like this should work just fine. #define NSBOOLLog(x) CFILogBoolean(#x, x)
extern void CFILogBoolean(char *propertyName, BOOL val);
void CFILogBoolean(char *propName, BOOL val) {
printf("%s is set to %s", propName, (val ? "YES" : "NO"));
}
|
Array of text for uilabels?
Date : March 29 2020, 07:55 AM
To fix the issue you can do The scenario is this: , Create an array with the names/labels you want to apply and use this: NSArray *arrayOfLabelTexts=[NSArray arrayWithObjects:@"Label1", @"Label2", nil];
cell.label.text=[arrayOfLabelTexts objectAtIndex:indexPath.row];
|
NSlogging/println SQLite db file location in Swift
Date : March 29 2020, 07:55 AM
wish helps you There is an easier way to get the sqlite location: println(NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as NSString)
/Users/tooti/Library/Developer/CoreSimulator/Devices/AB5B3350-F891-420B-88D5-E8F8E578D39B/data/Containers/Data/Application/38FBDC42-0D09-4A10-A767-17B576882117/Documents
NSLog(NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as NSString )
2015-01-23 23:31:57.373 RAACTutor[6551:140531] /Users/tooti/Library/Developer/CoreSimulator/Devices/AB5B3350-F891-420B-88D5-E8F8E578D39B/data/Containers/Data/Application/38FBDC42-0D09-4A10-A767-17B576882117/Documents
|
NOT NULL by itself outputs correctly. Adding NOT NULL, AND and OR outputs nulls
Date : March 29 2020, 07:55 AM
wish help you to fix your issue How does one combine the NOT NULL with the AND and OR? , You have to prioritize your logic (i.e. use parenthesis) : where rate_spread is not null and
(action_taken = 1 or action_taken = 6);
|