小编phi*_*ipp的帖子

获取UIButton所在的视图

我在自定义UITableViewCell上有一个UIButton,我有一个方法"完成".

如何通过Button获取CustomTableViewCell?

-(IBAction)done:(id)sender {
    (CustmCell((UIButton)sender).viewTheButtonIsOn...).action
}
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ios

6
推荐指数
2
解决办法
8180
查看次数

使用CherryPy加载静态内容

我现在尝试了很多东西,我用谷歌搜索了几个小时,但我无法解决我的问题.

配置文件:

[/] 
tools.staticdir.root = "/Users/phil/Dropbox/Projects/AppName" 

[/main.css] 
tools.staticfile.on = True 
tools.staticfile.filename = "/Users/phil/Dropbox/Projects/AppName/css/main.css" 

[/images] 
tools.staticdir.on = True 
tools.staticdir.dir = "images" 
Run Code Online (Sandbox Code Playgroud)

CherryPy代码:

import cherrypy, os
class AppName(object):
def index(self):
    return "<img src='images/logo.jpeg'>"
index.exposed = True

cherrypy.config.update('/Users/phil/Dropbox/Projects/AppName/conf/AppName.config')
cherrypy.quickstart(AppName())
Run Code Online (Sandbox Code Playgroud)

我的问题是它不起作用,我尝试了所有的东西与组合路径等,但图像和CSS不会加载,当我做像返回'"

以下是加载应用程序时出现的错误:

127.0.0.1 - - [24/May/2012:22:28:47] "GET /images/logo.jpeg HTTP/1.1" 404 1268 "http://localhost:8080/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5"
Run Code Online (Sandbox Code Playgroud)

python cherrypy

3
推荐指数
2
解决办法
1万
查看次数

错误未定义的符号:"_compress"与图像上载类

我想要使​​用这个类如何使用iPhone将照片上传到服务器?将图像从我的iPhone App上传到我的Web服务器.

Ive Copyd标题和主文件,并将"#import"EPUploader.m""添加到我的ViewControler中,我调用了EPUploader方法.

错误消息是:

Ld build/Release-iphonesimulator/PhotoApp.app/PhotoApp normal i386
cd /Users/phil/PhotoApp
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk -L/Users/phil/PhotoApp/build/Release-iphonesimulator -F/Users/phil/PhotoApp/build/Release-iphonesimulator -filelist /Users/phil/PhotoApp/build/NaoUp.build/Release-iphonesimulator/PhotoApp.build/Objects-normal/i386/PhotoApp.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/phil/PhotoApp/build/Release-iphonesimulator/PhotoApp.app/PhotoApp

Undefined symbols:
  "_compress", referenced from:
      -[EPUploader(Private) compress:] in EPUploader.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

对不起,如果它是一个noobie问题..我对此新:)

iphone xcode objective-c

1
推荐指数
1
解决办法
1513
查看次数

标签 统计

iphone ×2

objective-c ×2

cherrypy ×1

ios ×1

python ×1

xcode ×1