xcode4.5

Xcode 4.5 different iPhone backgroud on iPhone 4s and 5

心不动则不痛 提交于 2020-03-05 03:06:23
问题 I have made two different background images for my iPhone app: one in 640x960px (iPhone4s) and one in 640x1136px (iPhone5). But when I create the application layouts in the Xcode 4.5 Main Storyboard, how do I define and create it for both iPhone4s and iPhone5? So that the background automatically updates when i choose iPhone5 screen? 回答1: Just import your background image with the correct suffix For example : myImage.png for non-retina display myImage@2x.png for retina display myImage-568h@2x

How to attach an NSBezierPath to a CAShapeLayer

孤街醉人 提交于 2020-02-22 05:18:10
问题 I was wondering if someone could please help. Basically I have some Objective C code below, does anyone know how I can attach this to a CAShapeLayer for Mac OS X not iOS?. ****//// Color Declarations NSColor* fillColor = [NSColor colorWithCalibratedRed: 0 green: 0.886 blue: 0.886 alpha: 1]; NSColor* strokeColor = [NSColor colorWithCalibratedRed: 0 green: 0 blue: 0 alpha: 1]; //// Star Drawing NSBezierPath* starPath = [NSBezierPath bezierPath]; [starPath moveToPoint: NSMakePoint(106, 91.5)];

How to attach an NSBezierPath to a CAShapeLayer

╄→гoц情女王★ 提交于 2020-02-22 05:18:07
问题 I was wondering if someone could please help. Basically I have some Objective C code below, does anyone know how I can attach this to a CAShapeLayer for Mac OS X not iOS?. ****//// Color Declarations NSColor* fillColor = [NSColor colorWithCalibratedRed: 0 green: 0.886 blue: 0.886 alpha: 1]; NSColor* strokeColor = [NSColor colorWithCalibratedRed: 0 green: 0 blue: 0 alpha: 1]; //// Star Drawing NSBezierPath* starPath = [NSBezierPath bezierPath]; [starPath moveToPoint: NSMakePoint(106, 91.5)];

sqlite3_step(statement) == SQLITE_DONE is always false

只谈情不闲聊 提交于 2020-02-15 23:01:08
问题 I am trying to Sign up a user in my application. I have a view controller with 3 textfields (username, password and confirmpassword) and a submit button. The following method is called when submit button is pressed: -(IBAction)addUser { NSString *tempUser,*tempPass, *tempConfPass; tempUser = [[NSString alloc]init]; tempPass = [[NSString alloc]init]; tempConfPass = [[NSString alloc]init]; tempUser = [NSString stringWithFormat:@"%@",_mUserName.text]; tempPass = [NSString stringWithFormat:@"%@",

iOS Xcode connecting to MySQL database

时光怂恿深爱的人放手 提交于 2020-01-29 02:14:53
问题 I'm currently making an iOS App for my school, and have no previous experience with iOS programming. However, I do have experience with HTML/PHP/MySQL. Currently we have a basic tab bar application with 5 tabs at the bottom. Obviously, since this is an app for a school, it needs to be dynamic and hopefully we can set something up to connect to a database and retrieve school lunch menus, and news. I know how to connect to a database normally with PHP, but I have no idea how to do it using the

iOS Xcode connecting to MySQL database

孤街醉人 提交于 2020-01-29 02:14:08
问题 I'm currently making an iOS App for my school, and have no previous experience with iOS programming. However, I do have experience with HTML/PHP/MySQL. Currently we have a basic tab bar application with 5 tabs at the bottom. Obviously, since this is an app for a school, it needs to be dynamic and hopefully we can set something up to connect to a database and retrieve school lunch menus, and news. I know how to connect to a database normally with PHP, but I have no idea how to do it using the

XCode png compression issue

做~自己de王妃 提交于 2020-01-16 19:50:15
问题 During testing i found some thing strange in Xcode. I have a png of size 2.2 mb and the png compression is "YES" in the build setting after archive i extract the build and found that Xcode converted the png to 3.8 mb. Then with same test and png compression is "NO" in build settings then the image have same size of 2.2 mb. Is Xcode extend the size of PNG afte compression ?? 回答1: In all of my own apps, I keep PNG compression set to OFF as Apple has traditionally had problems dealing with

XCode png compression issue

安稳与你 提交于 2020-01-16 19:49:59
问题 During testing i found some thing strange in Xcode. I have a png of size 2.2 mb and the png compression is "YES" in the build setting after archive i extract the build and found that Xcode converted the png to 3.8 mb. Then with same test and png compression is "NO" in build settings then the image have same size of 2.2 mb. Is Xcode extend the size of PNG afte compression ?? 回答1: In all of my own apps, I keep PNG compression set to OFF as Apple has traditionally had problems dealing with

Implicit conversion of NSInteger error

孤街醉人 提交于 2020-01-13 07:33:10
问题 Using MagicalRecord, I am trying to get the record with a particular clientNumber which is a NSInteger (defined as int16 as the data type). This is my line of code where I'm getting the error: ClientInfo *clientSelected = [ClientInfo MR_findFirstByAttribute:@"aClientNumber" withValue: clientNumber inContext:localContext]; UPDATE: This is the definition of MR_findFirstByAtytribute: MR_findFirstByAttribute:(NSString *) withValue:(id) This is the error I'm getting: Implicit conversion of

Implicit conversion of NSInteger error

。_饼干妹妹 提交于 2020-01-13 07:32:26
问题 Using MagicalRecord, I am trying to get the record with a particular clientNumber which is a NSInteger (defined as int16 as the data type). This is my line of code where I'm getting the error: ClientInfo *clientSelected = [ClientInfo MR_findFirstByAttribute:@"aClientNumber" withValue: clientNumber inContext:localContext]; UPDATE: This is the definition of MR_findFirstByAtytribute: MR_findFirstByAttribute:(NSString *) withValue:(id) This is the error I'm getting: Implicit conversion of