Code Monkey home page Code Monkey logo

ios-6-cookbook's People

Contributors

erica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-6-cookbook's Issues

Retain cycle in RotatingSegue animation group

I've been using the RotatingSegue example in my app. I did a heap shot analysis with the steady state being before rotating forward and then snapshotting the heap after rotate forward and rotate back. I found that the RotatingSegue was not being dealloc'd (and thus responsible for holding onto my custom view controller and in turn a bunch of other objects).

In the end I noticed that
(a) the animation group delegate is a strong reference, the .h file states that it will last as long as the animation and
(b) the example code -[RotatingSegue animationWithDuration:] includes the line

group.removedOnCompletion = NO;

This statement overrides the default value. Commenting out the line allows the animation to be removed normally, the strong reference cycle broken, and the Segue to cleanup. Everything seems to still work fine.

This leaves one to wonder, what was the reason for overriding the default here? Is it unintentional?

Activity Controller example fails to dismiss activityViewController on iPad

The example app, Activity Controller, Chapter 8 / example 10, demonstrates a "roll your own activity", presenting a UIActivityViewController passing a UIActivity subclass instance, MyActivity, in the applicationActivities array. The MyActivity instance returns a TextViewController instance from its activityViewController method.

The presentation of the custom activityViewController and handling of the activityItems data works as described, however, though the -(void)done method handler is called by the TextViewController Done button event, in the iPad simulator and on an iPad device, the custom activityViewController (TextViewController) is not dismissed.

Per Apple UIActivity Class Reference documenting activityViewController:
"Discussion
The default implementation of this method returns nil. Subclasses that provide additional UI using a view controller can override this method to return that view controller. If this method returns a valid object, the system presents the returned view controller for you, instead of calling the performActivity method. On iPad, your view controller is presented inside of a popover. On iPhone and iPod touch, your view controller is presented modally.

Your custom view controller should provide a view with your custom UI and should handle any user interactions inside those views. Upon completing the activity, do not dismiss the view controller yourself. Instead, call the activityDidFinish: method and let the system dismiss it for you.

Note: If the view controller returned by this method presents additional view controllers, you are responsible for presenting and dismissing those view controllers. However, you must not dismiss the view controller returned by this method."

  1. The custom activityViewController is presented in full screen modal view, rather than in a popover as the docs describe, and,
  2. The activityViewController is not dismissed when the UIActivity activityDidFinish: method is called.

Is this an Apple bug? Or is there something I'm not doing correctly?

Thanks for the awesome book and recipes!

iOS 7

Thanks for this project! Should it be updated to iOS 7?

Calling superclass loadView: method

Should the superclass loadView: method be called in the various loadView: methods defined in your main.m files?

In the Apple Documentation, it says:
"You can override this method in order to create your views manually. If you choose to do so, assign the root view of your view hierarchy to the view property. The views you create should be unique instances and should not be shared with any other view controller object. Your custom implementation of this method should not call super."

I can go through and take care of this, if you want!

Recipe 10.7 Adding Action Drawers to Table - Delete button shown on drawer after swipe

2013-01-24 21 19 21
Core iOS6 Developer's Cookbook pg 392. Downloaded the latest code from github. When you select a cell the drawer appears. However, if you perform a swipe gesture on the action drawer as if you wanted to delete the drawer you see the delete button in the drawer cell. If you select the delete button the code crashes in libobjc.A.dylib with 'objc_exception_throw' on the com.apple.main-thread (serial).

How can the code be modified to prevent the appearance of the delete button in the action cell? I'd like to still allow the swipe gestures.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.