xcode7

Xcode: Vector images from PDF bad quality

℡╲_俬逩灬. 提交于 2020-12-30 04:54:41
问题 for my iOS Swift project I use vectorized pdf files from which Xcode renders the @1x, @2x, @3x images. When I compare the quality of the images generated from PDF with normal PNG images of the same size I see a big difference in the quality between them. Theoretically the quality of the first row and the third row in the following picture should be the same, because a 108x80 image should be rendered and used from my 54x40 PDF on my iPhone 6 with a normal retina display. Unfortunately the

How to use constraint Identifiers in autolayout and how to change constrain using identifiers? [Swift]

允我心安 提交于 2020-07-08 11:09:28
问题 While I was editing my constraint in Xcode 7 I found identifier field in Interface Builder. What is an identifier for the constraint how do I use it? using identifier can I access constraint programmatically and change the constant? my question is why and how is that identifier is helpful? Is there any way to access the constraint with an identifier with looping in subviews and again looping constrain subviews. I mean is there any way we can access constraint directly without a loop. UPDATE I

Why is ActivityViewController displaying auto constraint errors in console?

穿精又带淫゛_ 提交于 2020-06-29 11:35:16
问题 I'm trying to implement a share button in my application and so naturally, I turned to UIActivityViewController . For some reason, any time I press the share button and it pops up, I get the following message in my log: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or

Error: The source control operation failed because the revisions

独自空忆成欢 提交于 2020-06-24 07:12:51
问题 I've installed Xcode 7, and now always get this message when I select "commit" from xcode menu. "The source control operation failed because the revisions... could not be found." Any idea? :) 回答1: That could happen if the state of the git repo isn't proper: file outside if a git repo, or no commit yet (initial first commit), or no files added to the index (there was also repo of XCode 7 crashing on git commit) Go to the parent folder of the modified file, and to a git status , to check what

Error: The source control operation failed because the revisions

别等时光非礼了梦想. 提交于 2020-06-24 07:12:20
问题 I've installed Xcode 7, and now always get this message when I select "commit" from xcode menu. "The source control operation failed because the revisions... could not be found." Any idea? :) 回答1: That could happen if the state of the git repo isn't proper: file outside if a git repo, or no commit yet (initial first commit), or no files added to the index (there was also repo of XCode 7 crashing on git commit) Go to the parent folder of the modified file, and to a git status , to check what

Swift on OS X. How to handle global mouse events?

风流意气都作罢 提交于 2020-06-09 17:57:26
问题 I am new to Swift and Xcode and I have next problem: I have simple Cocoa Swift Application with one counter ( Label ). How to handle all mouse clicks in my Mac (in all applications) and display it in my Label ? I use Xcode 7.3.1. UPDATE 1. What I have already found it's Monitoring Events and addGlobalMonitorForEventsMatchingMask:handler: function in Cocoa, but I'm not sure that I'm on the right way. 回答1: You are correct about using addGlobalMonitorForEventsMatchingMask:handler: A simple