Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - lennyeiger

Pages: [1]
Book 3: Mastering Xcode and Swift / Going to Update this Book?
« on: October 19, 2018, 02:43:00 PM »
Are you going to be updating this book to iOS 12, Xcode 10?

Swift 3 Code / Re: mmBusinessObject for Swift 3
« on: October 08, 2016, 06:06:52 PM »
Kevin, thanks for this.

I'm still getting an error in the MMDynamicTypeExtensions.swift, line 139,

for (element) in registeredElements {
                let control = element as! UIView

Xcode is complaining that:  Type NSMapTable<AnyObject, AnyObject> does not conform to protocol 'Sequence'

I don't believe I am even using this... but it was part of the original MM series...

Thanks, Angelina. Everything is solved for now. I look forward to the new release.

Angelina, I don't mind paying for an update to the book. Perhaps it was foolish to update my code to Swift 3, but as I am sure you can imagine, I can't even build the thing out right now. When you say a book is in works, does that mean the release of it is imminent? This week, 6 weeks from now, 3 months?

I have to do demos soon and all I am looking for is help with the code that's giving errors. There's literally 5 errors on MMBusinessObject.swift and one on mmDynamicTypeExtensions.swift

I there no way but waiting for the book to get these repaired?

Book 3: Mastering Xcode and Swift / Swift 3 Update for MMBusinessObject
« on: October 04, 2016, 08:44:20 PM »
Hi folks. I implemented the MMBusinessObject scenario for my project, which I recently updated to Swift 3.

I am now getting errors in the MMBusinessObject.swift file. Is there an update for this that works with Swift and Xcode 8?



Book 3: Mastering Xcode and Swift / Re: Why is Embed in Stack doing this
« on: August 02, 2016, 09:48:15 PM »
Thanks, this is helpful.

Had another question, but I removed, answered my own...
I had labels of dissimilar width in a horizontal line, and they went nuts... when embedded. I had to put one set of labels in one stack, and the other in the other, then wrap a Stack around them...

Here's what happened. I added all sorts of constraints using the add suggested constraints. When I removed all of them and had only 2 constraints per UILabel, it accepted being installed in a Stack. (select a row, press the Stack button). I succeeded in most of it... then I realized that I set them up to be equally spaced vertically and I didn't want that. So I need to get one level more complex... deleting the last Stack wrapper turned out to be more than Xcode could handle... so I reverted to a backup. At the moment, I think I am on the right path... After hours and hours of trial and error... I am starting to understand the layout process.

Having only 2 layers of undo proved to be a real difficulty, wondering if there is some preference where one can add more... or utility.

Finally, I noticed that there are Horiz and Vert Stack Views that one can pull out from the Object Library and I and unclear whether I should have built things using those in the first place. Been looking back thru the books ai have and they don't often use all the things in the Object Library, just a couple of them - so I have no context with which to make this decision... 


Book 3: Mastering Xcode and Swift / Why is Embed in Stack doing this
« on: July 26, 2016, 11:09:47 PM »
I have 7 rows of labels on my view controller. There are 4 columns in each row. The first column is a typed-in label, for what is in the row, and the remaining 3 contain values I have passed in. It all works well.

I thought I would try the Embed in Stack feature and I have been fighting with it for hours. When I select a row, and select Embed in Stack View, or click the icon for same, it creates a huge rectangle. I have tried lots of things, the only clue I discovered is that on the Sizes Inspector, it adds a -1,000,000 to the X values. I did try clearing constraints before pressing the Stacks button..

What am I doing wrong?


Book 3: Mastering Xcode and Swift / Didn't work, then it did
« on: June 23, 2016, 03:29:41 PM »
I was working on the iDeliveryMobile app example, the part where you can add images of trucks for the different delivery statuses. When I completed it yesterday sometime, it didn't work. No images came in. I tried resizing the cells, I looked in the assets folder and there they were, etc. I saved, built numerous times, restarted Xcode and the Simulator. No go.

This morning I launched Xcode, pulled up the project, and there they were, just as they should be. I apparently executed the tutorial code correctly, all was well.

Is this a normal occurrence? Does Xcode just fail sometimes? Needs a 15 minute break?


Book 3: Mastering Xcode and Swift / Re: Made it to Page 358
« on: June 21, 2016, 02:50:56 PM »
Kevin, thanks for responding.

No, I just solved it. On page 331 of iBook, under point 9, the deliveryStatus var shows:

@NSManaged var deliveryStatus:DeliveryStatusEntity?

When it was originally generated (do I remember that it auto-generated from the database spec?) it looked like this:

@NSManaged var deliveryStatus: NSManagedObject

It's a bit worrisome since you mentioned that if one changes the database this file will get overwritten...

I had one other capitalization of "delivery" to fix, a couple of !'s Xcode requested on DeliveryStatus and now I'm good...
(at least until the next time.)


Book 3: Mastering Xcode and Swift / Made it to Page 358
« on: June 20, 2016, 10:29:13 PM »
I've been working on pages 350-365 in the iBook version all day. I've gotten a few errors.

I've re-read the code to look for errors 40 times now and I am wondering if there is some way to get a little assistance.

I just got an error that states: Value of type NSManagedObject has no member statusDesciption.

This line is highlighted:  the code is on page 362 in the iBook...

 if deliveryStatusEntity.statusDescription == self.shipmentEntity.deliveryStatus.statusDescription {

What am I doing wrong?


Pages: [1]