Re: UITableView's tableFooterView and autolayout

2014-06-11 Thread Sebastian Celis
On Jun 11, 2014, at 9:41 AM, Torsten Curdt wrote: > Thanks but there you are setting the frame yourself. The idea was to > use constraints. Usually you would pin them to the superview. But in > this case... My solution uses Auto Layout constraints to get the appropriate size for the header view

Re: UITableView's tableFooterView and autolayout

2014-06-11 Thread Sebastian Celis
Hi Torsten, On Jun 11, 2014, at 6:26 AM, Torsten Curdt wrote: > So what's the story with tableFooterView and tableHeaderView and > autolayout? I am trying to put a label into a footer. I have had luck with code like the following: - (void)viewDidLoad { [super viewDidLoad]; self.h

Re: Unbalanced calls to begin/end appearance transitions for UIViewController

2014-04-24 Thread Sebastian Celis
On Thu, Apr 24, 2014 at 6:22 AM, Torsten Curdt wrote: > Based on the Apple documentation I came up with the following method > to switch between controllers in a containment controller. > > But when there is an oldC I am getting "Unbalanced calls to begin/end > appearance transitions for <...>" o

Re: Why so many public properties all up in my grizzle?

2012-03-23 Thread Sebastian Celis
On Thu, Mar 22, 2012 at 6:39 PM, G S wrote: > On Mon, Mar 19, 2012 at 1:35 PM, Sebastian Celis > wrote: > >> 1) Embrace @properties...Exposing _ivars in header files is >> gross. You never want people to access them directly, so don't make >> those decla

Re: asynchronous nsurlconnection in nsoperation

2012-03-21 Thread Sebastian Celis
On Wed, Mar 21, 2012 at 10:59 AM, Ariel Feinerman wrote: > I wish to insert an asynchronous NSURLConnection into non-concurrent > NSOperation Hi Ariel, MBRequest does this. It is done by forcing the operation's runloop to continue running while the network connection is in progress. I would reco

Re: Device/Resolution independent positioning of GUI items on iOS

2012-03-21 Thread Sebastian Celis
On Mon, Mar 19, 2012 at 2:59 PM, Alex Zavatone wrote: > In the current project that I'm tasked to repair from the previous two > programmers, I've come across a load of UI elements that have been hardcoded > in place with the approach of: Just define the CGRect and we're all good. > > Nothing is

Re: Why so many public properties all up in my grizzle?

2012-03-21 Thread Sebastian Celis
On Mon, Mar 19, 2012 at 2:27 PM, Brian Lambert wrote: > Is there a way to declare ivars in the .M file AND have them accessible > from Objective-C Category files for the class? I will tell you how we handle public, private, and protected ivars and properties. The route we decided to take was influ

Re: NSFetchedResultsController with custom NSSortDescriptor

2009-08-19 Thread Sebastian Celis
Well, I sort dynamically on different properties so an explicit sortIndex wouldn't be ideal. But the lack of normalization just might work. I could create a boolean field which basically acts as 'hasProperty'. I can then hook into -willSave of the NSManagedObject to set that to YES or NO appropriat

NSFetchedResultsController with custom NSSortDescriptor

2009-08-19 Thread Sebastian Celis
Hello, I am using an NSFetchedResultsCountroller to execute a query against a Core Data database backed by a sqlite data store. I would like to sort the results by an NSString property of my NSManagedObject. However, if the property is nil or an empty string, I would like those results to appear a

Re: Programmatically Accessing Core Data Localization Strings

2009-06-22 Thread Sebastian Celis
Perfect! Thanks! - Sebastian On Mon, Jun 22, 2009 at 9:36 PM, Nick Zitzmann wrote: > > On Jun 22, 2009, at 7:56 PM, Sebastian Celis wrote: > >> I have a strings file defined for my Core Data model. As such, my >> Data.xcdatamodel file has a corresponding DataModel.strings f

Programmatically Accessing Core Data Localization Strings

2009-06-22 Thread Sebastian Celis
Hello, I have a strings file defined for my Core Data model. As such, my Data.xcdatamodel file has a corresponding DataModel.strings file. This seems to work great for auto-generated messages, but now I have a need to access these localized strings programmatically. NSLocalizedString does not seem

Re: Core Data, to-many relationships, and object graph consistency

2009-06-15 Thread Sebastian Celis
On Mon, Jun 15, 2009 at 12:58 PM, Quincey Morris wrote: > > If the comma-separated list is just for display in the user interface, you > could generate it on the fly. Use 'keyPathsForValuesAffectingTagList' (or > whatever) to ensure that the proper KVO notifications get sent when the > underlying b

Re: Core Data, to-many relationships, and object graph consistency

2009-06-15 Thread Sebastian Celis
I believe I found my issue. In my SCBook class I was overriding didChangeValueForKey:withSetMutation:usingObjects: so that I could store an NSString containing a comma-separated list of tags associated with the book. Apparently this is a very bad way to do it. I missed the big warning in the docume

Re: Core Data, to-many relationships, and object graph consistency

2009-06-15 Thread Sebastian Celis
On Mon, Jun 15, 2009 at 2:56 AM, Quincey Morris wrote: > What implementation of the 'tag' and 'book' properties are you using? (That > is, how are setTag and setBook defined?) I am just using @property and @dynamic to define all of these. SCBook.h: @property (nonatomic, retain) NSSet *tags; //

Core Data, to-many relationships, and object graph consistency

2009-06-14 Thread Sebastian Celis
Hello, I am having difficulty understanding how to work with a fairly simple Core Data model involving to-many relationships and their inverses. Imagine the following entities, attributes, and relationships: * Book - title (NSString* attribute) - author (NSString* attribute)