我有一个工作项目,部分是ObjC,部分是Swift 3。
我想在我的Swift文件中使用ObjC文件,因此我将#import "APIHTTPClient.h"
添加到我的桥接文件中。
突然间,我收到一条错误消息,说没有找到继承的文件:
继承的文件来自pod AFNetworking
。
有什么想法吗?
答案 0 :(得分:0)
在桥接标头中添加 download.file(
# I saved a version on my server so this script should work
# even if the NYC planning department changes things around
"http://www.rob-barry.com/assets/data/mapping/nypp_15b.zip",
destfile = "nypp_15b.zip")
unzip(zipfile = "nypp_15b.zip")
# Now, load package to read the shapefile
library("rgdal")
# Read it into an sp object:
nypp <- readOGR("nypp_15b", "nypp")
# Take a look! sp works seamlessly with R's plotting function.
plot(nypp)
download.file(
"http://www.nyc.gov/html/nypd/downloads/zip/analysis_and_planning /2014_sqf_csv.zip", "2014_sqf_csv.zip")
unzip("2014_sqf_csv.zip")
library("RColorBrewer")
library("classInt")
library("rgdal")
saf2014 <- read.csv("2014.csv")
safpct <- as.data.frame(table(saf2014$pct))
colnames(safpct) <- c("pct", "stops")
merge.shpdf.df <- function(shpdf, df, by.shpdf, by.df) {shpdf@data <- data.frame(shpdf@data, df[match(shpdf@data[, by.shpdf], df[, by.df]), ]); return(shpdf)}
nypp.merge <- merge.shpdf.df(nypp, safpct, "Precinct", "pct")
pal <- brewer.pal(5, "YlOrRd")
fill.clr <- findColours(classIntervals(nypp.merge@data$stops,style = "pretty", n = 5), pal)
plot(nypp, col = fill.clr)
legend(
"topleft",
fill=attr(fill.clr, "palette"),
legend=names(attr(fill.clr, "table")),
bty = "n"
)
文件,而不是coord <- data.frame(object = c("a","b","c","d","e","f"), pickuplong =
c(-73.93909 ,-73.94189 ,-73.93754,-73.91638,-73.92792,-73.88634),pickuplat =c(40.84408,40.83841,40.85311,40.84966,40.86284,40.85628))
。
因为#import AFNetworking.h
头文件导入了所有必需的文件。