iphone-sdk-3.0

How to include and use new fonts in iPhone SDK?

本小妞迷上赌 提交于 2019-12-04 17:11:30
I want to use font "MgOpen Modata" in my iphone App. But I dont see it in the font list in Property inspector. How do I include that font so that I can use it? Add the font files to your resource files Edit your Info.plist : Add a new entry with the key Fonts provided by application . For each of your files, add the file name to this array On the example below, I've added the font "DejaVu Sans Mono": In your application you can the use [UIFont fontWithName:@"DejaVuSansMono-Bold" size:14.f] . Or if you want to use it in html/css, just use font-family:DejaVu Sans Mono; Note: this is available in

Stop deceleration of UIScrollView

匆匆过客 提交于 2019-12-04 17:06:48
问题 What's the best way to immediately stop the deceleration of an UIScrollView in iPhone 3.0? I would like to keep the deceleration of the UIScrollView until it naturally stops or the user performs a certain action, whatever happens first. Thanks! 回答1: Untested suggestion coming up:) When the button tap event is caught, you read what the [scrollView contentOffset].x is, and set the offset to this value with animation OFF. 来源: https://stackoverflow.com/questions/2037892/stop-deceleration-of

How to include FFMpeg library in iphone project

 ̄綄美尐妖づ 提交于 2019-12-04 16:03:24
I am using iFrameExtractor to extract the frames. But when I clone the project I found that few files from ffmpeg framework was missing. I tried hard to include the missing file, but was not able to do that.. Can anyone sort out this issue or give me the link of FrameExtractor class which contains all the lib files of FFMpeg . I downloaded the project from this link but when i open the project i gets the following missing file in the image.! This are the missing files Well you could have a look at the following links FFMPEG Compiled Libraries And iOS FFMPEG integration on iphone/ ipad project

game state singleton cocos2d, initWithEncoder always returns null

萝らか妹 提交于 2019-12-04 16:03:22
问题 I'm trying to write a basic test "game state" singleton in cocos2d, but for some reason upon loading the app, initWithCoder is never called. Any help would be much appreciated, thanks. Here's my singleton GameState.h: #import "cocos2d.h" @interface GameState : NSObject <NSCoding> { NSInteger level, score; Boolean seenInstructions; } @property (readwrite) NSInteger level; @property (readwrite) NSInteger score; @property (readwrite) Boolean seenInstructions; +(GameState *) sharedState; +(void)

UITableView section header height for non-grouped table

て烟熏妆下的殇ゞ 提交于 2019-12-04 15:39:07
问题 Greetings! I know that UITableView sectionHeaderHeight is only used for grouped tables, but I'll ask anyway (in case there's some way to do this that isn't obvious) ... Is there a way to change the section header height (and with it, the font/size) for a NON -grouped table? Hoping "yes" or at least a "maybe" ... but fearing it might be a "no". Have at it, folks. 回答1: Yes. Use this delegate method: - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {

zlib directly for uncompressing a zip folder for iphone

我只是一个虾纸丫 提交于 2019-12-04 15:30:26
Is it possible to use the bare minimum zlib available on iPhone to uncompress a zip of a folder. I don't want to go for a open source library, please enlighten me the difficulty or possibility of implementing one piece of code which can uncompress a zip file. As JosephH said, you cannot use ZLib to deal with .zip files. But you can use the MiniZip library for that: http://www.winimage.com/zLibDll/minizip.html There's already an Objective-C wrapper, if you don't want to write yours: http://code.google.com/p/ziparchive/ FYI - ZLib on iPhone: Adds libz to the linked frameworks of your main target

NSDateFormatter returns nil for @“dd-MM-yy” in iOS 3.0

ぃ、小莉子 提交于 2019-12-04 14:33:38
问题 I have this part of code: NSDate *date =nil; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; [dateFormatter setDateFormat:@"dd-MM-yy"]; date = [dateFormatter dateFromString:inString]; [dateFormatter release]; It works perfectly fine, as expected in iOS 4.0. But the same code doesnt in 3.0. The string which I am getting, is like "12-Nov-10" and this is contained in inString pointer. The date formatter returns nil if the

UINavigationController back button problem in landscape mode?

感情迁移 提交于 2019-12-04 14:28:32
my iphone application supports portrait mode earlier, now i want to support land scape mode also. everything is working fine in my application except the navigation controller back button. i have used tableviews in navigaton conroller, when i click back button in landscape mode view is getting poped and its loading its previous view but animation is strange. i have given default animation but, in landscape mode view is is animating upside down instead of default left to rite when i click back button. does anyone faced this kind of problem??? thanks in advance. i understood the problem and

NSURLCache Problem with cache response

耗尽温柔 提交于 2019-12-04 14:09:50
问题 I'm writing an iPhone application, one of it's tabs is a twitter feed, i'm parsing twitter xml and putting it nicely inside a table view. In case there is no internet connection I would like to show cache results of the last time we had internet connection and the tables were updated. I'm using NSURLCache for that like so: NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:xmlLink] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:60]; NSURLCache

How to upload images from iPhone app developed using Titanium

爱⌒轻易说出口 提交于 2019-12-04 13:53:23
问题 I finally landed up in developing an iPhone app using Titanium Mobile. Now the problem I face is, Im able to run the app, and the app also sends the image to the server. But Im not able to see the file that got uploaded to the server. I have pasted the iPhone app's code to send image to the server and also, the PHP file that would receive the file from the app. var win = Titanium.UI.currentWindow; var ind=Titanium.UI.createProgressBar({ width:200, height:50, min:0, max:1, value:0, style