Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

objective-c-category

Duplicate symbol error when adding NSManagedObject subclass, duplicate link

September 4, 2023 by Tarik

If you do not generate managed object subclass automatically, then don’t forget to check “Codegen” settings for an Entity in Data Model Inspector:

Categories ios Tags ios, nsmanagedobject, objective-c-category, xcode Leave a comment

Protocol versus Category

August 10, 2023 by Tarik

A protocol is the same thing as an interface in Java: it’s essentially a contract that says, “Any class that implements this protocol will also implement these methods.” A category, on the other hand, just binds methods to a class. For example, in Cocoa, I can create a category for NSObject that will allow me … Read more

Categories objective-c Tags objective-c, objective-c-category, objective-c-protocol Leave a comment

Add rounded corners to all UIImageViews

February 10, 2023 by Tarik

Check this – Rounded Corners on UIImage The layer modification seems to be the best way. UIImageView * roundedView = [[UIImageView alloc] initWithImage: [UIImage imageNamed:@”wood.jpg”]]; // Get the Layer of any view CALayer * l = [roundedView layer]; [l setMasksToBounds:YES]; [l setCornerRadius:10.0];

Categories ios Tags code-reuse, ios, objective-c-category, subclass Leave a comment

Class extension vs class category

January 25, 2023 by Tarik

The main difference is that with an extension, the compiler will expect you to implement the methods within your main @implementation, whereas with a category you have a separate @implementation block. So you should pretty much only use an extension at the top of your main .m file (the only place you should care about … Read more

Categories objective-c Tags class-extensions, objective-c, objective-c-category Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa