ios – Does Apple Maps use Core Graphics internally?

Yes, Core Graphics – also known as Quartz 2D – is fast enough to render a map.

To prove the potential, find a vector representation of a map encoded as a PDF file. Using Preview.app, view the map. PDF rendering on Apple’s operating systems uses Core Graphics.

The Core Graphics framework is based on the Quartz advanced drawing engine. It provides low-level, lightweight 2D rendering with unmatched output fidelity. You use this framework to handle path-based drawing, transformations, color management, offscreen rendering, patterns, gradients and shadings, image data management, image creation, and image masking, as well as PDF document creation, display, and parsing.

You can prove Maps.app on macOS uses Core Graphics using the nm tool:

nm -m /Applications/Maps.app/Contents/MacOS/Maps | grep CG

The output shows numerous calls to Core Graphics:

(undefined) external _CGAffineTransformEqualToTransform (from CoreGraphics)
(undefined) external _CGAffineTransformIdentity (from CoreGraphics)
(undefined) external _CGAffineTransformInvert (from CoreGraphics)
(undefined) external _CGAffineTransformMakeRotation (from CoreGraphics)

You can see Maps.app is linked against the QuartzCore and CoreGraphics frameworks with otool:

otool -L /Applications/Maps.app/Contents/MacOS/Maps

reactjs – React Native IOS Build Not Updating

so I have an app in react native. I’m facing a problem regarding ios release build. When I’m running in debug mode it’s working fine. However if we push it to testflight then it seems like the latest code was not pushed to release build.

I have tried switching schema from debug to release to test it in local environment and voila! Same results can be seen locally. Code is not updating for release build.

Tried almost everything in my knowledge.

Need help asap.

modal view – Position of Done button on iOS WebViews

On iOS modal screens, I’m following a pattern of always positioning key/affirmative actions on the right (Save, Add, etc) and dismissive actions on the left (Done, Cancel, Close). However, if a dismissive action is the only action on the modal, it will be positioned on the right.

On iOS WebViews, it’s standard to have a refresh icon allowing users to reload/refresh the page. Most WebViews have this refresh icon positioned on the right, while a Done button is positioned on the left. This follows the logic mentioned above, however, my assumption is that closing the WebView (i.e. selecting Done) would be much more common and used compared with the refresh action on the right. Would it make sense to swap the positions here and have Done on the right? Or would such exception be inconsistent with iOS patterns?

bitcoin core – What is the best free iOS wallet out there?

I only ask this question because there’s so many kinds of wallets out there and I understand the difference between wallets(hardware wallets, iOS and Desktop wallets). But what is the best wallet in your opinion? would you be recommending that wallet to someone that’s located in Asia?

iphone – iOS mail downloads when set to manual but on charge

This seems to be an ongoing problem to which I seem to have inadvertently found the solution. Apart from those already suggested, setting Push to off, all a/cs to manual including Fetch, you need to turn off Mail notifications. If this is on it appears to override all other settings and downloads mail from the server. Why it only does it when the phone or tablet is on charge beats me but for me at least it works!

bluetooth – iOS how to read bluetoothd service logs in the console?

I’m debugging a Bluetooth app on an iPhone. When I connect it via cable to a Mac, I see that Apple logs output from “bluetoothd” service in between my app’s output. The logs contain central/ peripheral events, incoming requests, rssi info, etc.

Where can I find documentation to understand what is happening with bluetoothd ata hardware level?

I’m looking for information like “this hen I see packet X, the connection state is Y”, or “this message means the device has reconnected to a service Z”

ios – UICollectionView jumps/scrolls when a nested UITextView begins editing

My first question on SO so bear with me. I have created a UICollectionViewController which has a header and 1 cell. Inside the cell is a tableview, inside the table view there are multiple static cells. One of those has a horizontal UICollectionView with cells which have UITextViews.

Problem: When tapping on a UITextView the collection view scrolls/jumps

Problem Illustration

On the right you can see the y offset values. On first tap it changes to 267 — the header hight. On a consecutive tap it goes down to 400 — the very bottom. This occurs no matter what I tried to do.

Note: Throughout my app I’am using IQKeyboardManager

What have I tried:

Disabling IQKeyboardManager completely and

  1. Taping on text view
  2. Replacing it with a custom keyboard management methods based on old SO answers

Set collectionView.shouldIgnoreScrollingAdjustment = true for:

  1. all scrollable views in VC
  2. Individuals scrollable views

Note: this property originates from the IQKeyboardManager Library and as far as I understand it is supposed to disable scroll adjustment offset.

Tried disabling scroll completely in viewDidLoad() as well as all other places within this VC. I used:

collectionView.isScrollEnabled = false
collectionView.alwaysBounceVertical = false  

Notably, I have tried disabling scroll in text viewDidBeginEditing as well as the custom keyboard management methods.

My Code:

The main UICollectionView and its one cell are created in the storyboard. Everything else is done programatically. Here is the flow layout function that dictates the size of the one and only cell:

extension CardBuilderCollectionViewController: UICollectionViewDelegateFlowLayout {
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: 
UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    let height = view.frame.size.height
    let width = view.frame.size.width
    return CGSize(width: width * cellWidthScale, height: height * cellHeigthScale)
} 
}

Additionally, collectionView.contentInsetAdjustmentBehavior = .never

The TableView within the subclass of that one cell is created like so:

let tableView: UITableView = {
    let table = UITableView()
    table.estimatedRowHeight = 300
    table.rowHeight = UITableView.automaticDimension
    return table
}()

and:

    override func awakeFromNib() {
       super.awakeFromNib()     
        dataProvider = DataProvider(delegate: delegate)
        addSubview(tableView)
        tableView.fillSuperview() // Anchors to 4 corners of superview
        registerCells()
        tableView.delegate = dataProvider
        tableView.dataSource = dataProvider
    }

The cells inside the table view are all subclasses of class GeneralTableViewCell, which contains the following methods which determine the cells height:

var cellHeightScale: CGFloat = 0.2 {
    didSet {
        setContraints()
    }
}

private func setContraints() {
    let screen = UIScreen.main.bounds.height
    let heightConstraint = heightAnchor.constraint(equalToConstant: screen*cellHeightScale)
    heightConstraint.priority = UILayoutPriority(999)
    heightConstraint.isActive = true
}

The height of the nested cells (with TextView) residing in the table view is determined using the same method as the one and only cell in the main View.

Lastly the header is created using a custom FlowLayout:

class StretchyHeaderLayout: UICollectionViewFlowLayout {
    
    override func layoutAttributesForElements(in rect: CGRect) -> (UICollectionViewLayoutAttributes)? {
        let layoutAttributes = super.layoutAttributesForElements(in: rect)
        
        layoutAttributes?.forEach({ (attribute) in
            if attribute.representedElementKind == UICollectionView.elementKindSectionHeader  && attribute.indexPath.section == 0 {
                
                guard let collectionView = collectionView else { return }
                
                attribute.zIndex = -1
                let width = collectionView.frame.width
                let contentOffsetY = collectionView.contentOffset.y
                print(contentOffsetY)
                if contentOffsetY > 0 { return }
                let height = attribute.frame.height - contentOffsetY
                attribute.frame = CGRect(x: 0, y: contentOffsetY, width: width, height: height)
            }
        })
        return layoutAttributes
    }
    
    override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
        return true
    }
}

This is my first time designing a complex layout with mostly a programatic approach. Hence it is possible that I missed something obvious. However, despite browsing numerous old questions I was not able to find a solution. Any solutions or guidance is appreciated.