Code Monkey home page Code Monkey logo

Comments (7)

wimagguc avatar wimagguc commented on July 4, 2024

thanks @TomDoes,
which xcode / ios version are you using? is there a difference passing NULL or nil object?
(also, i've updated the setButtonTitles function with some more defensive code, which should handle null pointers a bit better. would be fun to chase this down though.)

from ios-custom-alertview.

TomDoes avatar TomDoes commented on July 4, 2024

Hey this is in xcode 5 ios 7.0.x tried it on devices and simulator. I figured it might have something to with NULL or nil, however both result in a bad access. I tested your more defensive code and it doesn't fix the BAD ACCESS When i remove the setButtons line it works fine again, but with a close button.

from ios-custom-alertview.

wimagguc avatar wimagguc commented on July 4, 2024

getting weirder. if you want, you can try to change the CustomIOS7AlertView's init function to be

buttonTitles = nil;

(instead of buttonTitles = @[@"Close"];), that would do the same as setting it to nil with setButtonTitles. perhaps that gives you more insight in the problem. if not, feel free to share some more code, i'll try to look at it. in private, you can find me on twitter by the @wimagguc handle.)

from ios-custom-alertview.

TomDoes avatar TomDoes commented on July 4, 2024

Well, setting buttonTitles = nil in the init fixes the bad access problem.

from ios-custom-alertview.

wimagguc avatar wimagguc commented on July 4, 2024

is it an arc project?
in any ways, we are using @sythesize for the getters/setters - so if a project clean doesn't solve your problem, please feel free to send some more code. (i tried to run the one you have in place, and it works all fine in emulator and on the device as well.)

from ios-custom-alertview.

TomDoes avatar TomDoes commented on July 4, 2024

Yes, it's an arc project. It's weird, for now i'll leave it like this. If I encounter similar problems later on, or the source of the bad access i'll let you know.

Thanks for looking into it!

from ios-custom-alertview.

wimagguc avatar wimagguc commented on July 4, 2024

haha no worries. i'll close this for now, but just fire up a new ticket if you have more details on this.

from ios-custom-alertview.

Related Issues (20)

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.