Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AlecZ

macrumors 65816
Original poster
Sep 11, 2014
1,173
123
Berkeley, CA
I'm reading The Swift Programming Language by Apple, which contains lots of code examples I want to copy into Xcode for experimentation. Every time I paste, I have to remove the citation and quotes it adds in, which is cumbersome. Is there a way to get around this?

Example:

Code:
[COLOR="Red"]"[/COLOR]struct Card {
    var rank: Rank
    var suit: Suit
    func simpleDescription() -> String {
        return "The \(rank.simpleDescription()) of \(suit.simpleDescription())"
    }
}
let threeOfSpades = Card(rank: .Three, suit: .Spades)
let threeOfSpadesDescription = threeOfSpades.simpleDescription()[COLOR="red"]”

Excerpt From: Apple Inc. “The Swift Programming Language.” iBooks. https://itun.es/us/jEUH0.l[/COLOR]
 
Last edited:

jennyaxe

macrumors newbie
Aug 10, 2015
1
0
Stockholm
The best solution I've found is to highlight the text I want to copy. Then, I can select the text in the Notes panel and copy it without getting the citation stuff.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.