Category "objective-c"

auto layout modify multiplier of constraint programmatically

How can I modify the multiplier of a constraint programmatically? I have set the following: [self.view addConstraint:[NSLayoutConstraint constraintWithItem:_bu

Build error integrating Clevertap to a Reactnative Application

I'm trying to integrate clevertap with native react and when I include "use_frameworks!" in cocoa pods to be able to use #import <CleverTapReact / CleverTa

Keychain access control from the app with different names

I am using keychain in my macOS app to store jwt tokens (access and refresh)(kSecClassGenericPassword) and I have figure out that I can't manage existed data vi

Set text in uicollectionviewcell

I have created a UIcollectionView and an array with some strings @[@"Item One", "Item Two", @"Item Three"]; In Tableview I would do this: NSString *object = s

Keychain access control from the app with different names

I am using keychain in my macOS app to store jwt tokens (access and refresh)(kSecClassGenericPassword) and I have figure out that I can't manage existed data vi

iOS: Recieveing a crash NSInvalidArgumentException NSConcreteMutableAttributedString addAttribute:value:range:: nil value

This is the line that the error is occurring on. [self addAttribute:(__bridge NSString*)kCTForegroundColorAttributeName value:(__bridge id)color.CGColor range

How to save a color in NSUserDefaults in swift?

I have a litle problem with saving a color in NSUserDefaults . In objective-c is easy : -(NSColor *)colorForKey:(NSString *)key{ NSData *data; NSColor *color

Get class name of UIViewController in swift

How do you get the class name of a UIViewController class in Swift? In Objective-C, we can do something like this: self.appDelegate = (shAppDelegate *)[[UIAppli

Center NSTextAttachment image next to single line UILabel

I'd like to append an NSTextAttachment image to my attributed string and have it centered vertically. I've used the following code to create my string: NSMuta

CLLocationManager startUpdatingLocation not calling locationManager:didUpdateLocations: or locationManager:didFailWithError:

I'm trying to use the CLLocationManager framework in my iOS project to access the user's location but when I call [locationManager startUpdatingLocation] ne

How to step over objc_msgSend function in lldb?

In objective-c, function cal is translated to objc_msgSend. e.g. [foo doSomething:@"keke"] is translated to objc_msgSend(foo, "doSomething:", @"keke") How

Constrain mouse movement to region in OS X without jitter

I would like to constrain mouse movement to a specific rectangular region of the screen in OS X 10.11. I modified some code from MouseTools (below) to do this b

Move the annotation on Map like Uber iOS application

I am working on a project where I need to create a similar iOS application to UBER and OLA where the car is moving based on the location. I'm looking for some k

CABasicAnimation to make NSView flip

I'm making a card game for mac and I'm using a CABasicAnimation to making the card flip around. It's almost working, but it could be a bit better. As it works

How can I find out if an SKTexture is the placeholder image

In SpriteKit, if you load an image with the [SKTexture textureWithImageNamed:] method, it will first search your bundles, then atlases, if it fails to find your

ScrollView contentOffset reset after pushViewController

I'm experiencing a problem with ScrollView, my scrollView has 640 of width, from 0 to 320 it's a mapView, from 320 to 640 it's a tableView. I have a segmentedBu

Error: CUICatalog: Invalid asset name supplied: (null), or invalid scale factor : 2.000000

TableViewApplication[1458:70b] CUICatalog: Invalid asset name supplied: (null), or invalid scale factor: 2.000000 Getting this warning while working with Ta

Change the size of UILabel or the font to fit in Accented Character

I have a UILabel with Text inside it called : self.textLabel; Now, I noticed that whenever I added an accented letter like Ä Ö Ü, then I get

Proper way to check if a sub view is outside of the content size of its parent UIScrollView

I have an app that has a UIScrollView with an array of thumbnails for videos. When you touch the thumbnail, the thumbnail begins playing the video. However, whe

CoreData valueForKey issue on Xcode 13

I have an issue in a client's app where calls to valueForKey: on an NSManagedObject subclass are failing for particular CoreData properties when the app is buil