Probably something simple I'm missing, but I'm trying to write a very simple predicate - return all rows from a table where an NSNumber column value = 3.I've tried many variations of the following with no success:NSPredicate *predicate = [NSPredicate predicateWithFormat:@correct_number = %@, @3];NSPredicate *predicate = [NSPredicate predicateWithFormat:@correct_number == %@, @3];NSPredicate *predicate = [NSPredicate predicateWithFormat:@correct_number = %@, @3];NSPredicate *predicate = [NSPredicate predicateWithFormat:@correct_number == %@, @3];Can someone help me to recognize the rror of my ways, please?Thanks in advance!
Search results for
column
2,047 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
By way of additional info that I realized I should show you, here's the main issue: self.myInfoMO = [NSEntityDescription insertNewObjectForEntityForName:@MyInfo inManagedObjectContext:self.managedObjectContext]; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@MyInfo inManagedObjectContext:self.managedObjectContext]; [fetchRequest setEntity:entity]; // Specify criteria for filtering which objects to fetch NSPredicate *predicate = [NSPredicate predicateWithFormat:@correct_number == %@, @3]; [fetchRequest setPredicate:predicate]; // Specify how the fetched objects should be sorted // NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@ ascending:YES]; // [fetchRequest setSortDescriptors:[NSArray arrayWithObjects:sortDescriptor, nil]]; NSError *error = nil; NSArray *fetchedObjects = [self.managedObjectContext executeFetchRequest:fetchRequest error:&error]; if (fetchedObjects != nil && fetchedObjects.c
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Awesome! Thanks so much NotMyName! Now I see what's happening and how it works. It's funny how an example in real life makes all the difference. I'm not sure why I didn't get this from the documentation, but I do understand why the Recipe and Earthquake (Threaded CoreData) examples haven't been what I need. For what I'm doing, each button has 3 values to be loaded from the database so there's no 1:1 column to field equivalence, plus I'm essentially doing a detail view and not able to use a TableViewController.I really appreciate your time in showing me what I needed!
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
Depending on exactly what data you have and what you want to achieve, you can use -localizedStandardCompare:. This sorts just like the Finder would, which typically includes numeric sorting.I would have expected the sort descriptor that you showed, using a comparator block, to work. Are you sure you set it at the right time? How was columnArray populated? Generally, you should find columns by identifier, not index, since tables can reorder columns or have hidden columns.If you can't get that to work for some reason, you can create a category on NSString with a new comparison method. Be sure to put a unique-to-your-project prefix on the method name so it will never collide with an actual method on NSString, now or in the future. Have it just return the result from -compare:options: (or -compare:options:range:locale: with the locale specified, for locale-appropriate sorting), like your comparator block does.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
I have my app presenting a two-column text layout that spans multiple pages. I have it arranged as per Apple's documentation, with a single NSLayoutManager and multiple NSTextContainers/NSTextViews. All is working fine on Yosemite and previous versions. Now, with El Capitan, only the first page is being drawn.Before, when calling addTextContainer to the NSLayoutManager, the manager would lay out all the text and create new text containers when needed to handle the multiple pages of text, and add these views to the scroll view. Now, it seems to, well, not do anything. I've traced the code and the functions are all being called, but the additional views aren't being added to the parent scroll view so nothing past the first page is being displayed.Every change I make to try to debug this makes the view show nothing at all. Only the original code seems to work, and that only for one page.WHAT DID APPLE CHANGE TO MAKE THIS FULLY WORKING CODE DIE????
Yes! I finally figured it out, and was able to get my leaderboards showing up this morning. After contacting Apple about the problem I got clarification, and here's exactly what you have to do:1. In your Xcode project select your Images.xcassets. You should see your Brand Assets and LaunchImage appear in the next column.2. Right-click under those files, and from the menu select Game Center->New AppleTV Leaderboard.3. Add your art to the icon.4. Now, here's the trick that makes it all work: with the Leaderboard selected view the asset's info in the info pane on the right side and be sure to select the little editor icon (not sure what else to call it). This shows you the Game Center Leaderboard info, and here is field for Identifier. Here you simply enter the com.yourcompany.yourapp.yourleaderboard identifier for the leaderboard that icon is for.Now, when you run the app everything will work perfectly!I'd attach screenshots, but it appears the new Developer Forum doesn't have an option for image at
Topic:
App & System Services
SubTopic:
Core OS
Tags:
I'm having a problem with flexbox on iOS9. See ieee-ac.org for an example. It overlays and overprints columns that should have been stacked vertically. iOS8 works fine but not iOS9. Could it be the same problem that's described here?
Topic:
Safari & Web
SubTopic:
General
Tags:
The Build command builds all the targets in the currently selected scheme. It will also build all actions (Analyze/Test/Run/Profile/Archive) whose checkmarks are selected (see the Build item in the left column of the Edit Scheme dialog). Note the checkbox at top Parallelize Build, this allows Xcode to build your project much faser since it can build more than one action at a time. After making a major change and building, later builds may be faster and some parts won't need to be re-built.The Build For option can be used if a parallell build would take a lot of time and you just want to do a partial build to, for example, do an Analyze.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I have a simple CSS to emulate iBook-lile layout:* { box-sizing: border-box;}html { height: 100%;}body { height: 100%; padding: 2em; font-family: 'Gentium Basic', serif; column-count: 2; column-gap: 4em;}h1, h2, h3, h4, h5, h6 { font-family: 'Unica One', cursive; text-align: center;}.title-display { margin-bottom: 6em;}p { text-indent: 2em;}I need to create a layout with horizontal scrolling only. So if column-count is 2 or bigger - everything looks fine.The page scrolling only horizontaly, and I could scroll my layout with JavaScript.The example is here: http://codepen.io/fredy26/pen/QjgZEPBUT! If i trying to change the amount of columns to 1, by setting column-count: 1; everything breaks. All text is placed inside one column with vertical scrolling. To compare, Chrome is working fine.
My unknown senders section does not work. Everybody who texts me Who's suppose to me in the unknown column pops up in the SMS and contacts section .
Hi,I am setting an Sortdescriptor on an NSArrayController backed TableView. The numeric search works only sometimes (mostly after restarting the application one or twice).Is there a better place to set the sortdescriptor?ThxFrank- (void)viewDidLoad { [super viewDidLoad]; // Do view setup here. // Datasource set for custom sorting only [self.eventsTableView setDataSource:self]; // set a sortDescriptorProtoype to support custom sorting // Column number, a NSString in the model ist filled with numeric values (mostly) // therefore a numeric search NSSortDescriptor *numberSortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@number ascending:YES comparator:^(NSString *a, NSString *b) { return [a compare:b options:NSNumericSearch]; }]; NSTableColumn *tableColumn = [self.eventsTableView tableColumnWithIdentifier:@number]; [tableColumn setSortDescriptorPrototype:numberSortDescriptor]; // sort the tableview initially by number [self.eventsTableView setSortDescriptors:@[numberSortDescriptor]]; }
Setting the sort descriptor prototype of a table column allows the column to inform the table view of how it should be sorted when the user clicks that column's header. (Again, the table view isn't able to sort itself, but it informs the data source or, if so bound, its array controller, which sorts the data.)It also allows the table view to show an indicator in the header of the primary-sorting column.If your table doesn't have headers or will only ever have one column or isn't otherwise user-sortable, then you don't need to set the column's sort descriptor prototype.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags:
Sorry the question is how to build the 2 column 23 rows by program, not with interface builder.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
I can't get the column widths in this UICollectionView to resize upon a rotation change as the invalidateLayout from the custom UICollectionViewFlowLayout is NOT triggering the sizeForItemAtIndexPath method in the collectionView? Any ideas? I really just want the column resizing to occur via the sizeForItemAtIndexPath upon rotation.**Output Code on Rotation**Note: sizeForItemAtIndexPath is not triggered even though invalidateLayout is...> ViewController:viewWillLayoutSubviews > GCCalendarLayout:shouldInvalidateLayoutForBoundsChange > GCCalendarLayout:invalidateLayout**Custom Collection View** import UIKit class GCCalendar : UICollectionView, UICollectionViewDataSource, UICollectionViewDelegate { // Init --------------- func commonInit(coder aDecoder: NSCoder) { print(GCCalendar - commonInit) self.registerClass(GCCalendarCell.self, forCellWithReuseIdentifier: GCCalendarCell) self.dataSource = self self.delegate = self let layout : GCCalendarLayout = GCCalendarLayout(coder: aDecoder)!
The Xcode editor allows for vertical cutting using option-click-drag, why does it not support vertical pasting? This type of feature can be very handy at times.