How can multiple changes be combined into one commit before pushing to a repository?
iOS
How to determine the time cost of inserting a new element into an array?
Can you explain what automatic memory management mechanism ARC in iOS means?
Can you explain what the Chain of Response pattern is and how it is used?
Where is the reference counter usually implemented for memory management?
What storage place would you choose for confidential images and why?
What motivated you to choose a career as an iOS developer?
Can you list other types of memory used in programming, besides the stack and heap?
Could you explain what the layoutIfNeeded method does in the context of interface updates?
Can you explain the term 'queue' in the context of data structures?
What is the main function of the WebSocket protocol and in what scenarios is it used?
Is it possible to programmatically change the height of a specific cell in UITableView to a forced value?
What exactly is specified when creating a Semaphore object for initialization?
// Enum for HTTP methods enum HTTPMethod: String { case post = "POST" } // Enum for errors enum Errors: Error { case invalidUrl case invalidQuery case invalidResponse case httpStatus(Int) } // Protocol for decoding protocol MyDecoder { func decode<T: Decodable>(_: T.Type, from data: Data) throws -> T } // Network service class final class NetworkService { private let session: URLSession private let encoder = JSONEncoder() private let decoder: MyDecoder init( session: URLSession = .shared, decoder: MyDecoder ) { self.session = session self.decoder = decoder } // Request method func request<Response: Decodable, Body: Encodable>( urlString: String, method: HTTPMethod, body: Body? = nil, headers: [String: String] = [:], query: [String: String] = [:] ) async throws -> Response { guard var components = URLComponents(string: urlString) else { throw Errors.invalidUrl } if !query.isEmpty { components.queryItems = query.map { URLQueryItem(name: $0.key, value: $0.value) } } guard let url = components.url else { throw Errors.invalidQuery } var request = URLRequest(url: url)
How does using UIStackView differ from UITableView when creating a user interface?
In what situations is it recommended to use NSLock for thread synchronization?
Explain the stages of the lifecycle of a ViewController instance in an iOS application.
Can you explain the concept of weak references in programming?