将CALayers保持在CALayer容器的范围内

时间:2015-09-24 22:25:46

标签: ios objective-c calayer

我目前正在尝试构建一个时钟应用程序,它需要从iPhone 4到iPad一直工作。当然,我有一个扩展问题。我注意到时钟指针在某些设备中运行良好,并且在其他设备中无法正常工作。我的手是钟面的子层,双手都固定在0.5。

有人能够向我解释我错过了什么吗?我已经尝试设置手的界限,但它似乎不起作用。

secHand.bounds = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, self.frame.size.height);

1 个答案:

答案 0 :(得分:0)

我意识到我没有缩放时钟臂,但我正在缩放钟面。

ArrayList<String> urls =new ArrayList<String>(); urls.add("http://www.un.org/sc/committees/1267/1267.xml"); urls.add("http://www.un.org/sc/committees/1988/1988.xml"); urls.add("http://www.un.org/sc/committees/consolidated.xml"); urls.add("http://www.treasury.gov/ofac/downloads/sdn.xml"); Iterator itr=urls.iterator(); while(itr.hasNext()) { String url=(String)itr.next(); URL file_url = new URL(url); logger.info("Url names :"+file_url); InputStream stream = file_url.openStream(); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = dbf.newDocumentBuilder(); documentBuilder.parse(stream); } String str = getJcmsPropertyLoader(context).getUploadXmlPath(); String file_name= ""; File folder = new File(str); File[] listOfFiles = folder.listFiles(); for (File file : listOfFiles) { if (file.isFile()) { file_name = file.getName(); } }

相关问题