Objective-C

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.

How to Easily Switch Between Xcode versions

Despite what you may have heard, it is possible to have multiple versions of Xcode installed at the same time without using any special tools or apps. You'll just need to use xcode-select on the command line to switch between them whenever you go from, for example, Xcode 9 back to Xcode 8.

Inspecting and Changing Visual Elements With LLDB and View Debugger

Have you ever added an element in an UIView and after checking in the simulator you realized that it was not what you were expecting?

Compilation time that mixing Objective-C with Swift

Learn how the build system determines which files should be recompiled and find out the best way to reduce the compilation time when mixing Objective-C and Swift,

Higher Order Functions in Objective-C

Map, filter, reduce and flatMap implementations for NSArray. Higher Order Functions in Objective-C. // Map: Iterate a collection and apply the same block operation to each element in it. print(characters.map({ String($0).uppercased() })) - (NSArray *)map:(id (^)(id obj))block { NSMutableArray *mutableArray = [NSMutableArray new]; NSArray *array = @[ @"H", NSArray *array = @[ @"H ...

Refine Objective-C Frameworks for Swift

Refine Objective-C Frameworks for Swift. Objective-C will be gradually replaced with Swift. Before that, there is a lot of opportunity to boost your Objective-C code embracing Swift. This article is the keynote of WWDC Refine Objective-C frameworks for Swift. The nonnull annotation was wrong when Objc returns nil for a value Swift thinks can’t be optional if you are using the NSString or NSArray on Objc side. You will end up with an invalid object and it’s hard to be noticed, because Objc method calls ignore nil, but in some cases, you’ll crash with a null pointer dereference or get other unexpected behavior.

To the depth of @objc and dynamic in Swift

Swift generates code that is only readable to other Swift code. But if we need to interact with the Objective-C runtime, we need to instruct Swift what to do. Here [email protected] to make swift code available to Objective-C. Have you ever wonder why to prefix @objc even if the code is written purely in Swift? The answer is, although you may have whole code in Swift there are some frameworks that use Objective-C runtime — UIKit is one of them. Simply we can say @objc means we want our Swift code (class, method, property, etc.) to be visible from Objective-C.” Swift generates code that is only readable to other Swift code. But if we need to interact with the Objective-C runtime, we need to instruct Swift what to do. Here [email protected] to make swift code available to Objective-C. Have you ever wonder why to prefix @objc even if the code is written purely in Swift? The answer is, although you may have whole code in Swift there are some frameworks that use Objective-C runtime — UIKit is one of them. Simply we can say @objc means we want our Swift code (class, method, property, etc.) to be visible from Objective-C.”

How to create objects in JavaScript

In this article, we will see the different ways to instantiate objects in JavaScript.

Getting Started with JavaScript Object

Objects in JavaScript, just as in many other programming languages, can be compared to objects in real life. The concept of objects in JavaScript can be understood with real life, tangible objects.

Javascript Objects Tutorial Example

A basic example of Javascript Objects example used by almost every Javascript application or embedded Javascript

A guide to Object Detection with OpenCV and Swift

In this article, we’ll see how to create and launch a object detection algorithm using OpenCV and Swift

How do I change UIImageView image in view controller in traitCollectionDidChange

I want the image in my UIImageView to us a different image file that's cropped to correctly fill the landscape mode upon the orientation changing from portrait to landscape. All of the following code is defined in a class that extends UIViewController.

Uncaught ReferenceError: books is not defined

Write a function checkBasket() that lets you know if the item is in the basket or not.

iOS requestStateForRegion returning .unknown after didStartMonitoringFor

Confused about why my AppDelegate CLLocationManager sometimes can't successfully determine CLRegionState (CLRegionState.unknown), even though I am making sure to not call requestStateForRegion until after didStartMonitoringForRegion. Seems like some sort of race condition that I don't understand how I'm not handling.

How to use Objective C Cocoapods in Swift Framework

My swift framework has dependency of Objective C Framework. How do I use that ?

Passing a Swift protocol to an Objective-C pointer

<em>Using XCode 10.1 / Swift 4.2.</em>

Accessing Swift protocol property implemented in an Obj-C class from another Swift class

I've seen lots of questions regarding implementing Obj-C protocols in Swift, but not so much the other way around, and I haven't seen this specifically.

ios- Get unique identifier which should have to be same after reinstalling of the app

I have a use case that I want to bind the user with a particular device id. So that purpose I need a unique device identifier.