Will, I set in the settings click on the subject, the label how the controller to jump to home. My approach is
[Self.navigationController presentModalViewController: main animated: YES [; But doing so would lead me home pictures can not show, but the bottom of the label switching also gone Reply: This should be your arrangements controller nesting problems. presentModalViewController is a pop-up modal dialog API, if your case, at least label bar is included in the navigationController. Should use a mainController navigationController and labels containing bar the controller, if you need to return home, then for mainController operation, rather than navigationController
This method is the following telephone numbers written in the form of a fixed string, click the button to open the Phone Dialer NSURL * url = [[NSURL alloc] initWithString: @ "tel :021-99999999"]; [[UIApplication sharedApplication] openURL: url];
But the following telephone number is dynamically generated on the dial is always me, the point of no response
/ / Number is dynamically generated telephone numbers, number is retrieved from the remote json request, access is no problem, log trace display correctly displayed in ihone buttons are also correct
Question: how to dynamically generate a phone number to dial Reply: Type a mistake NSUrl * url = [[NSUrl alloc] initWithString: @ "tel:% @", number]; [[UIApplication sharedApplication] openURL: url];
Reply: Type a mistake NSUrl * url = [[NSUrl alloc] initWithString: @ "tel:% @", number]; [[UIApplication sharedApplication] openURL: url];
When you see the picture in an application or background good, want to develop their own at the same time, what software can export such material ah?
Reply: Image is very simple ah. Screenshot chant. . . Music words. . Not clear how to obtain. Recording is also possible. Reply: You go to download the installation package (do not know how to download?) Is a ipa file, change the extension zip, extract the open, you will find the things you want, of course, if you can not use the windows picture browsing Browse, then the png is designed for Iphone do, you go to the next online conversion tools can be Reply: What clearly Caesar converter
If the. If so, how to do it? Reply: In addition, the development, then, is not required to carry it on an Apple computer? Reply: Theoretically possible, but as far as I know, very few people do so. In 2005, Apple announced the Java Cocoa bindings in Mac OS X 10.4 and later versions are discarded technology. In other words, Cocoa the API may not support the gradual emergence of Java functionality.
I added a lot of labels on the map, click on the pop-up AnnotationView label includes many information such as qq, address, phone, pictures, etc., but I am not in the past some of the data transfer, the system Annotation only the title, subtitle two attributes, I use a proxy - (MKAnnotationView *) mapView: (MKMapView *) mapView viewForAnnotation: (id ) annotation; Data can be transferred only two of my Annotation have a custom that I need to write their own agent? Reply: The problem lies in MKAnnotationView on the bar? Need to define a
Why are some places NSInteger not replaced int? ? ? ? Reply: Specifically what went wrong? NSInteger is the object and int is the basic data types, not objects.
Reply: Blind say, NSInteger is not an object! Depending on the platform, NSInteger sometimes int, sometimes long
As to the question can not be transferred, it should be set strict compiler
Reply: When you need to use a variable of type int, I like to write C programs can be the same, with int, you can also use NSInteger, but more is recommended NSInteger, because it would not consider the equipment is 32-bit or 64-bit. Landlord you can see the following definition: # If __ LP64__ | | (TARGET_OS_EMBEDDED &&! TARGET_OS_IPHONE) | | TARGET_OS_WIN32 | | NS_BUILD_32_LIKE_64 typedef long NSInteger; typedef unsigned long NSUInteger; # Else typedef int NSInteger; typedef unsigned int NSUInteger; # Endif
Reply: Depending on the platform, nsinterger is 4 bytes
Which talk under WinXP to iPad (iPhone) to do a Hello, World, you need to install the software development kit which can be encoded and debugging. Reply: Virtual Machine VMWare Operating System: OS X Lion X 10.x Development Environment: xcode 4.x Installation time required to boot the boot image as Darwin.iso
After installation, the virtual machine (vmware) the ios device debugging on a virtual machine. If you need to deploy to a real device, you must xcode to crack. xcode 4.2 crack and device debugging
Reply: > Virtual Machine VMWare Which version of this ah VMware Workstation for Linux 9.0? Reply: On XP when prompted to install the virtual machine virtual machine has been installed, you can install ah no, why? Reply: Directly mounted black apple Reply: > Virtual Machine VMWare > Operating System: OS X Lion X 10.x > Development Environment: xcode 4.x > Install when the need to use the boot image to boot as Darwin.isoHow do you install, which is to install a virtual machine, and then ... and then ...,? ? ? Reply: Many problems ah, ask you: 1, Microsoft provides a tool to detect whether the hardware supports virtual machines (HAV), the result is a machine I do not support 2, the actual test a bit virtual machine (VMWare environment), PowerON after the prompt does not support. 3, in the search BAIDU get the following prompt, Win7 system to install the patch ID: KB977206, may support HAV. > Microsoft recently released a patch, patched does not support virtualization of the physical machine can also play a virtual machine Problem is to install the patch (Windows6.1-KB977206-x86.msu/Windows6.1-KB977206-x64.msu) Tips are not suitable for the current system (Win7 Ultimate)
Install Iphone prompt does not support Mac OS X software virtualization. To run Mac OS X, you need to host VMare Workstation supports hardware virtualization My phone configuration: Asus notebook P43SJSystem win7 Ultimate Motherboard: Asus P4SJ (Intel HM65 chipset) Memory: 4GB
I am also looking into the BIOS inside, seem to find that feature, I may be a BIOS not familiar with it! I hope you help me look at how to deal with this problem Thank you Reply: Your CPU does not support virtualization, and see your CPU model Reply: My CPU model is: Intel Pentium (Pentium) B960@2.20GHz dual-core, thank you Reply: BIOS watching cpu, if there is no hardware virtualization do not support, intel's cpu many do not support hardware virtualization, my Core Duo, do not support hardware virtualization. . . It was reported that a commercial war with the amd result, amd cpu basic support all the hardware virtualization However, the latest the intel cpu have begun to support the hardware virtualization
Brother built a dedicated thread to catch the video source on the web video, this video thread each grasping a sleep (1.0/50); The captured video saved to NSMutableArray * saveImage, the other caught 50 pictures is to build a TIMER to display these images, TIMER per (1/30) seconds to perform a show saveImage front of a picture, and then [ saveImage removeObjectAtIndex: 0]
Adopt such a way to play catch pictures
The effect is not very satisfactory, when playing obviously do not feel smooth, no FLASH player video source is good, ask the home usually are how to solve it? There is a good way to do
Reply: Use Proxy Pattern, until then loaded into the display area, and always maintain the thumbnail in memory Reply: Your idea is wrong, you get hold of the received frame decoder thrown inside better.
Use COREDATA, set two tables, company and department two tables. Want to set up a company in relation to more than one department, the company added a table relationship relationship named dept. And the relationship has been marked to-many relationship hook.
But when I do not know how to insert data to build up this relationship.
Push on the news, have been puzzled. Server how to get all of the client device token.
1. Each client can send APNS device token server. 2. Local APNS message server to send information to the server, must have device token.
Where this device token obtained? Debug is able to understand, we can read their own itouch / ipad / iphone on. But on-line APP, device token should take the initiative to push all users to APNS. How we get from the server to the APNS device token it? Does each message can only be sent to a device token? Reply: Generally like this: device token is sent by the client to get your own server. When you need to push message, your server sends a push message with a device token to Apple's servers, Apple servers pushed under the device token to the corresponding client Reply:
Positive solution. Apple will need to get yourself a token, given their own servers. Reply:
That server-side access to the client device is immediacy or client will be sent to a local storage device up? Reply: Need to save up. Reply: save it, then it is saved to the local database? If so, delete the user how to push the client when the server-side synchronization delete database records.
Also, I downloaded the ios server side there is a feedback device functionality, looks to get the user's device registration, but always get the data.
/ ** * Retrieves a list of inactive devices from the Feedback service. * @ Param args * / private static void feedbackTest (String [] args) { String keystore = args [0]; String password = args [1]; boolean production = args.length> = 3? args [2]. equalsIgnoreCase ("production"): false; try { List devices = Push.feedback (keystore, password, production);
Reply: Need to save to the server. Reply: You say the problem is that the official figure given in Step 3, this absolutely must own server to each DeviceToken keep up with FeedBack reception, ps: Reply:
Can I upload the application to the phone when the phone is not connected to external networks, is still able to have direct access to the device token, how it was obtained from the apns? Give me the feeling that direct phone ios device token get it on?
I used to play games with GLKView and GLKViewController drawing, They are now found on IOS5 unique, IOS4 no, Had replaced UIView and UIViewController, manage their own CEAEGLLayer, Previously GLKViewController provides drawInRect let me be drawn per frame, Now no drawInRect, how can I draw it frame by frame? UIViewController have repeatedly invoked the callback function? I can not open a thread dedicated frame draw it? Reply: To find a solution, with NSTimer Reply: Also do animation using UIImage Reply: There are in UIView drawRect: method. Here you can get the graphics drawing context CGContextRef, to handle your drawing operations
The company gave me the mac is mac 10.8, installed the latest xcode (4.5.1), 4.3 is not installed on the xcode I want to learn iphone development. But only the new iOS 6.0 project. 6.0 feels a lot of stuff is not the same. I want to restore to iOS 5.1 which is 5.0. How to get. Reply: Can be A, uninstall xcode 4.5.1, you can then install 4.4. xcode is just an app
Xcode4 basically in app form after installation, so directly from the application can be deleted, the previous version requires / Developer / Library / uninstall-devtools-mode = all Reply: Possible, ios SDK version you set up on the line. Reply: Set ios deployment target is 5.0 or 5.1 on the line,, Do not drop xcode version Reply: mac os version is too high. You can get hold of the equipment 4.1 4.3 10,7 Reply: Yes, I just deleted 4.5.1, reinstall the 4.4.1
Reply: How to set sdk version? Reply: xcode and ios version is essentially bound, so download the corresponding version of xcode ios can ios5 corresponding xcode4.4 ios6 corresponding xcode4.5 Others are a little too Lao Leba Reply: xcode 4.5's book too little!
This picture is transmitted over the network, I have now decoded and read in memory, and now how to display it in a view? ? ? ? Seeking heroes wing ~ a code harder to good Reply:
UIImage * drawimage = [UIImage imageWithCGImage: imageref] ;/ / *** __ NSAutoreleaseNoPool (): Object 0x1e5950 of class UIImage autoreleased with no pool in place - just leaking
/ / Why every time you run into the following sentence at all output will be displayed: / * Thu Aug 30 18:41:14 homewell test [1377] : CGContextSaveGState: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextSetBlendMode: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextSetAlpha: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextTranslateCTM: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextScaleCTM: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextDrawImage: invalid context 0x0 Thu Aug 30 18:41:14 homewell test [1377] : CGContextRestoreGState: invalid context 0x0 * / [Drawimage drawInRect: imagerect];
CGImageRelease (imageref);
Reply: Initialized with CGImage NSData Reply: NSData into UIImage, and then use the UIImageView display Reply: I was able to stream directly RGB convert NSData UIImage do? Reply: It is said not own tune drawInRect, with setneedsdisplay look Reply: NSData * data = / / / read memory the pictureUIImage * image = [UIImage imageWithData: data];
I defined a UITextField * string, then the need to string.text content (an integer) is assigned to a number of type UInt16 value, string.text data type should be NSString type, that is, the number of type NSString into UInt16 type number, seeking advice ~
Reply: NSString's intValue method, and then turn int Uint16
I give my app set up Set bundle, home key to exit, and then to set up inside the app to change some of my preferences, and then click to enter the results when the app did not change the value. app in the existing methods are not called. Great God seeking advice, in this case, which will be called systems approach ah? Reply: UiApplacationDelegate in applicationDidBecomeActive read your new configuration Reply: I also found a way: Add the following code in viewDidLoad: UIApplication * app = [UIApplication sharedApplication]; [[NSNotificationCenter defaultCenter] addObserver: self selector: @ selector (applicationWillEnterForeground :) name: UIApplicationWillEnterForegroundNotification object: app]; Then implement applicationWillEnterForeground: Method - (Void) applicationWillEnterForeground: (NSNotification *) notification { NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; [Defaults synchronize]; / / RefreshInfo way is to write your own, used to retrieve the user's settings [Self refreshInfo]; }
UITabBarController which contains UITabBarItem, click UITabBarItem will switch to a view, Now double-click the event would like to ask you UITabBarItem there? If so, what should I deal with it inside?
Simulator can be well received by the real machine information, everything is normal; But two real machine or fax machine to send information to the simulator, then 95% of the information is not received.
Where the network simulator and real machine connected to the same network, all come with a wireless router.
I feel like a wireless network problems, but saw wireless router setting items, Which did not find connection, the wireless router is TPLINK. Now very depressed, do not know the machine set up, or network problems. Reply: Add the wireless router WAN port is not the case as the switches used Reply: Real machine IP is 192.168.1.123 and 192.168.1.105 Simulator is 192.168.1.103
Variable with @ property (nonatomic, copy) defined, there is a need in the @ interface defined in it?
@ Interface MapLocationInfo: UIViewController { NSString * lat ;/ / Longitude variable with @ property (nonatomic, copy) is defined, there is a need in the @ interface defined in it? Here defined variables defined variable with @ property What is the difference?
}
@ Property (nonatomic, copy) NSString * lat ;/ / Longitude
@ End Reply: Should be defined in the @ interface, interface is defined in the class members, and @ property (nonatomic, copy) NSString * lat ;/ / longitude, this is an indication of this property (nonatomic non-atomic order represents the current object is a thread running, so you can save resources; copy indicates that the property will automatically copy assignment object), and @ synthesize paired lets the compiler automatically generates a similar java in the get and set methods. Reply: @ Interface MapLocationInfo: UIViewController { / / Define variables } / / Define methods
@ End
Exactly two things. Reply: This issue will be IOS SDK5 get a good solution, in IOS SDK5, variables can be defined only in the @ property, and add a new property, strong. ARC also provides support for IOS SDK5, later wrote OC procedures do not worry about the memory problem.
But if you are still in use SDK4 or earlier, then it must be stated in the Interface.
(Note: Although Apple has now provided SDK5 the download, but currently does not support APPStore submit applications based SDK5 ) Reply: If the two are the same name of the place, it is not necessary, if not the same, it would need to have to write two outside. Reply: Affirmed only in the property when you use self.lat call
Platform: xcode4.3.2 Problem: VAAudioRecorder class can implement recording, but the recording is stored in a file Help: How to achieve processing while recording mode, that is when I can get a recording intervals (eg 500ms) recording of data in memory
Known to turn char type wchar code is as follows: TZWchar * m_ptext; TZChar strCommand [max_path] = {0}; NSString * str0 = [[NSString alloc] initWithBytes: m_ptext length: (wcslen (m_ptext) * sizeof (TZWchar)) encoding: NSUTF8LittleEndianStringEncoding]; if (str0) { strcpy (strcommand, [str0 UTF8String]); } These realized in C + + WideCharToMultiByte (CP_ACP, NULL, m_ptext, wcslen (m_ptext), strCommand, max_path, NULL, NULL); Will XCode from Char to wchar how to write. Reply: Are the same, you change the encoding: NSUTF8LittleEndianStringEncoding Hangleba
Read the iphone develop multithreaded the information, I understand that: the newly opened threads (such as using NSOPERATION) data can only wait for the end of the thread to another thread. Unlike WINDOWS, I open a thread with a while (1) statement, you can make a new thread always exist. The data can be a new thread of communication between threads spread out. Is my understanding correct? If my understanding is correct, and now my iphone client program, you need to listen for tcp connection, at any time from the server receives the data sent, how to achieve this? Please expert guidance, thank you! Reply: Is wrong. NSOperator just NSThread above package a bit. If you want to use, such as windows on the thread, then you can use NSThread.
TCP listening links, reference socket c / s mode. Internet search vessels, many related to the introduction. Reply: ls on the right, with nsthread on it. . . Reply: First of all thank two of cheer. I read the following technical documents: http://developer.apple.com/library/ios/ # technotes/tn2109/_index.html # / / apple_ref/doc/uid/DTS40010274 Which was about NSThread unsafe. Before considering the use NSOPERATION. If you have experienced that NSTHREAD, I can also use NSTHREAD. NSTHREAD where you can add while (1) such cycles do? How to pass data out of it. Also want to enlighten me more carefully. Thank you!
iphone development, on-device debugging, call the real machine camera, camera, how to set the photo looks too have names such as "1111.jpg", and looks after the photos are always covered by a previous picture? Reply: Resolved
Code / / Save the image to the sandbox NSArray * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * filePath = [[paths objectAtIndex: 0] stringByAppendingPathComponent: [NSString stringWithFormat: @ "1111.jpg"]] ;/ / save file name BOOL result; result = [UIImagePNGRepresentation (images) writeToFile: filePath atomically: YES]; / / returns YES successfully saved
Because when I am in the beginner IOS development, early learning development environment set up so I spent a lot of time, so I want to record a video to learn IOS just want to give some of the development of the friends to have some help and inspiration I'll be satisfied.
Main content:
1, VMware Workstation 8.0.4 installation
2, VMware is installed on Mac OS X 10.7.3
Development tools Xcode 4.3.2 installation
3, the virtual machine performance optimization
Ado, directly on the video, a friend in need can first preview
There is a need, then you can download HD videos, all the tools are packaged in a video tutorial, larger file also gives the download address.
Reply: me is ordinary laptop ah, Y460 I3 processor. Present use from the development environment to build a virtual machine although not as a real machine, but still relatively smooth, the memory to be bigger job. Reply: Thank you very much lz recording tutorial, I look after the benefit, but encountered a problem: The vmware share folder in the mount after the xcode copy to application directory, copy it to half an error - can not complete this operation because an unexpected error occurred (error code -22), I wonder if lz have not encountered? xcode own can run. Reply: Hello, I just touch ios developer, want to install a black Apple systems + xcode, Very excited to see your posts Oh, Your Youku video has a password, the password is the number? There is, your Thunder download, download failed
The following four segue, which experts explain when to use:
manul segue
relationship segue
action segue
selection segue Reply: Did not people use storyboard? Reply: xib's passing Reply: Nothing timing. My understanding is that storyboard segue piece inside the line of action. Is another programming ideas. Ie: not dynamically create controller, but for all the controller are automatically created through the segue, so easy to see the whole view of the flow and relationships. Of course, he is still can manually create. Reply: In fact, still need to manually jump automatically jump distinction, how convenient how habits how to Such action segue trigger that jump, do not
As stated, there is such a software? Such as window putty or secure CRT on the class There, ipad software can be used with vpn landing it? Thank you! Reply: iphone & ipad looks like it can be set directly vpn!
Settings -> General -> Network -> vpn Reply: Certainly, cydia Tops MobileTerminal, then apt-get install ssh, finally ssh your-linux-server-ip can Reply: There are many in the itunes search SSH Terminal
UINavigationController + UITabBarController both used together. . Why is the title of the navigation happens not set on it. . . Reply: In each controller's init function add self.navigationItem.title = @ "controller title";
He will put the name of tabbar modified. . . Navigation bar or not Reply:
Not ah. . Reply:
Navigation bar above or not. . Reply: Your UINavigationController + UITabBarController is how to use Reply:
Is to tabbar added to the nav root attempt, and then added to the window in the nav. . self.tabBar = [[UITabBarController alloc] init]; self.tabBar.viewControllers = arry;
Then I think in the first set on the interface at the nav title Reply: You try self.tabBar.title = @ "***", Also, I think you have a problem of structural design, it is best to join tabbarcontroller navigation view controller inside, tabbarcontroller as the topmost Reply: self.title = @ ""; you can modify Reply: Is push the viewcontroller of self.title is the navigation bar to see the title, instead of setting the navigation object Reply:
I wrote an example pass up, you see is not what you want http://download.csdn.net/detail/beijinuo/4734208 Reply:
I there are four interfaces, and if so write it not the case then four interfaces are the same name. . . I think every interface has its own name. . .
I downloaded the package and SBJson.zip TouchJson.zip packages, how to package it into IOS project? Whether the project can be imported zip package, how they can use after import: # import "SBJson / SBJson.h" Beginner IOS, seeking god pointing ah? Reply: Point in your project to find the build phases below link binary ... can be a plus point
Reply: There are a lot of zip. m and. h file, I get that zip file, and then link that folder, or how to do it? I put the two zip zip package to the project, and then link them, but I can not use # import "TouchJson / JSON / CJSONDeserializer.h" to refer to files inside it ah? If I were to be invoked, how can I import? Reply: Point in your project to find the build phases below link binary ... can be a plus point
Reply: These two packages are used directly source, no link binary Directly from the finder. H and. M files onto xode project can be Reply:
That there are many. H and. M files, ah, I could not have dragged over ah, I put what TouchJSon.zip unpack the archive, and then copy it to my inside that project, which is equivalent to all of the files are copied , and while I can in my file # import to introduce through the inside of the file, but when I use that class, a compile-time error: Undifined symbols for architecture i386: "_OBJC_CLASS_ $ _CJSONDeserializer", Referenced from: objc-class-ref in ParseJsonViewController.o id: symbo (s) not found for architecture i386: clang: eroor: linker command failed with exit code 1 (use-v to see invocation) Reply:
This error description is a basic package does not import just about SBJSon used, only inside JSONKit.h and m is sufficient. Reply: 6th Floor, positive solution. I put all the. M files are in the Compile Sources added, after which there is no error in compiling it. But I still tangled a question: the so-called import package in the end what is the concept? I link between a zip archive seems to be unavailable to the inside of the file. Put that unpack, and then link that folder. This approach may not know science. In Android can be imported directly into a jar, and then use inside classes. I do not know what is in the IOS. Reply: IOS external packet format are generally. A and. Dylib, instead. Zip,. A and. Dylib equivalent andrioid a jar of
Reply: Oh I was in line to download the package, its format is zip, how can I put those labeled a. A or. Dylib bag? Please advise.
segue election with the iPad Popover, such as A above a button after clicking popover out B, is not the only A can get B data, B A, no way to get some data ah? Now A wants to send data to the popover point out viewcontrollor (B), but the A, B, ViewDidLoad prepareForSegue always called until after the results do not pass over the data. How to do that? Reply: You can set the properties of B prepareForSegue achieve
I tried this, this is always in the dest viewcontroller prepareForSegue ViewDidLoad execution until after the call, so not ah Reply: If you want to get to before the ViewDidLoad value, then your ideas are wrong, you should write your own init method, when the init parameter passing. initWithxxx: (id) xxx
I xcode development for beginners, the company wants to be a client wants to use the company's Mobile webview nesting site, and then publish to app up, I do not know whether this feasible, Apple will not pass it?
There is a problem, I've had in the National Day of the above things get, of course, is in control of the hello world tutorial online to do, the National Day back after upgrade xcode, how to get all die. . Seeking large cattle advice. .
Code
viewcontroller.h
se / / / / ViewController.h / / Test / / / / Created by xxx on 12-9-19. / / Copyright (c) 2012 å¹´ xxx. All rights reserved. / /
I do not know grammar, or what has changed, thank you.
Reply: May pass, because your application is not localized. It is said that some applications based on Phonegap useless approved, is the reason. Reply: Recommend that you use phonegap, can not pass on the audit, which has nothing to do web applications and is not
If that can not get into itunes data, including the song plays, which ranked in itune, song of the album name, artist and other information. Xianxie! Reply: http://stackoverflow.com/questions/5317225/music-preview-from-itunes-music-store-in-ios-app
I use openal play received audio stream, the LAN using UDP send and receive, because only a cell phone, it should be sent to their phone up test, right? The problem is data can be received, but the phone is no sound, there are heroes who help me analyze ah. . . Thank you
There is now a UIViewController application, now I want to add one in this application login screen, giving the application displays the login screen when you start, but tried many ways do not work, experts have urged twelve. Reply: In viewdidload Riga no good? Reply: Did not quite understand what you say ~ ~ ~ I understand you delegate object inside the first call into your login screen then jumps to the login screen before doing those pages! Reply: I added in didFinishLaunchingWithOptions open the login page code slightly, or mainWindow inside plus login page line ah Reply: In didFinishLaunchingWithOptions (delegate in) inside join login code, after the successful landing in the call originally UIViewController Reply: In the delegate you want to set the page first loads the landing page, landing page viewdidload write you the information you want to display the login screen. Reply: Current through the interface to add in the original sub-interface to achieve, thanks for your answer
Recent projects LZ upgrade begins to migrate your database to achieve a progress bar shows the progress of the database migration data migration is completed whenever a progress bar forward a little Operation is an object database migration progress bar is a separate View control view to achieve the object of the agency However, the database migration view inside the data changes, but the interface does not refresh
I use openal play received audio stream, with the real machine when sent to the simulator, the simulator can play sounds, but with a real machine to a real machine to send audio, I hear sound, anybody know why? Reply: Found that the sound is there, but will be very slow to appear, people know the cause?
Is to a picture pasted into a PDF file on the mouse pointer position, what to do? Urgent! Reply: It looks like a picture will paste in the past, in fact, this PDF is the need to be repainted. Open the pdf PDFDocumentRef, and then draw pictures on the page.
void yourDrawPDFFunc (...) { ... / / In the BeginPage drawn between the content of this page and EndPage called when CGPDFContextBeginPage (pdfContext, pageDictionary); / / Draw the original first page data / / Then call drawPicture CGPDFContextEndPage (pdfContext); .... }
Reply: As for your mouse pointer position, the data transfer is good, right? Note that the coordinate system conversion.
Also, a suggestion: do not use as much as possible after posting "urgent!!" This wording more clearly describe their problems patiently, trying to do what I hope what effect, the card where it is. His word describes the problem very few people willing to participate in the general answer and exchanges.
uipickerview can use setframe set the size, but I set a height of 80 or less, you can not change, and this is why ah Seek expert answers Reply: UIPickerView height seems to be fixed Reply:
Edit properties of the control bar can not be set, but setframe can be changed, that is, the following will not change to 80, more than 100 can be
As stated above, in my mac has been compiled on the platform. A library file directly added to the xcode project using a compile error ah, heroes who know how to use the library do? Thank you, ah ~ Reply: Need to re-cross-compiler ~
imac has been in the LAN can not access windows machines with shared
Built on windows tomcat based web services (REST)
Want to be accessed in xcode; encountered a problem: enter the URL directly into the safari, access less content (but can ping ip ah!)
With NSData * data = [NSData dataWithContentsOfURL: [NSURL URLWithString: urlAddress]]; data is always nil;
In other can ping the windows machine, enter the URL in the browser can get directly to the content
Ask you a great God, which is what causes it?
Reply: With NSUrlConnection try. In DidReceiveData and DidFinishLoading inside look can receive data. Reply: Or not, URL nowhere! Reply: Try to write directly IP Reply: Enter the URL directly into the safari, access less content (but can ping ip ah!)
telnet windows machine to try port 80, it should be web services windows machine problems
Will the next ios gcc compiler only pure C programs do, whether g+ + compiler? Can compile the C + + Reply: Compiler support c + +, objc mixed, the extension to. Mm on the line Reply:
Sure you can compile C + + stl contain code that you Reply: OK, boost can be Reply:
boost is not used to write c, which is quasi-c + + standard library
If that. 1, OBJC call C functions very easily. 2, C how callback OBJC? How to OBJC class pointer to C? Reply: Same, the objc object passed as a parameter of type pointer to c function like Reply:
C source file is not recognized objc object pointer, if the header files into objc bunch of errors occur. Reply:
MPMusicPlayerController run on the emulator is not prompted to open the database, is not in the simulation can not put into ipod itunes music library Reply: This can not be! Reply: This is not possible, I forgot the specific
Novice mobile game development, horizontal screen, integral wall advertising only supports vertical screen, you need to temporarily change a direction of how to deal with? Reply: The Internet example, a reference
http://www.istar.name/blog/ios-development-rotation Reply: It depends on your specific implementation of the code of the game ah. Paste the code you look Reply: First try this, first ensure both portrait and landscape screen feasible. Then in the horizontal screen ViewControllers, add this:
Reply: If not ios6 version can be used in AppDelegate, achieve standings horizontal screen.
/ / Need to support landscape. According to customize - (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation { return UIInterfaceOrientationIsLandscape (interfaceOrientation); }
# If __ IPHONE_OS_VERSION_MAX_ALLOWED> = __ IPHONE_6_0 - (NSUInteger) application: (UIApplication *) application supportedInterfaceOrientationsForWindow: (UIWindow *) window { return UIInterfaceOrientationMaskAllButUpsideDown; / / if the problem here may be xcode version, xcode version to 4.5 + } # Endif
Is set to landscape mode
Reply: This did not come across .. Reply: http://blog.csdn.net/xuanwenchao/article/details/7979744
xcode can not be assigned directly to wstring What? eg: std :: wstring sz = L "abc123 you and me." Reply: Yes, I tried no problem Reply:
# Import # Include # Include
int main (int argc, const char * argv []) { std :: wstring sz = L "abc123 you and me"; wprintf (L "% s \ n", sz.c_str ()); NSLog (@ "% s \ n", sz.c_str ()); return 0; }
------------------- The code above outputs: a 2012-11-14 09:13:22.932 test [572:303] a -------------------- Also whether 64 or 32, in? Xcode under sizeof (wchar_t) is 4, while? Windows under 2. UNICODE is not mac system is UTF32, rather than UTF16? Reply: Unix-wchar_t implementation is UTF32, mac os x darwin so the bottom is also UTF32 Also can not use c_str () indicates unicode, encounters 0 on the end wprintf, wcout like the c function seems to unicode support is limited, do not quite understand Can be converted into NSString output: std :: wstring wstr = L "abc123 you and me"; NSData * data = [NSData dataWithBytes: wstr.data () length: sizeof (wchar_t) * wstr.size ()]; NSString * str = [[NSString alloc] initWithData: data encoding: NSUTF32LittleEndianStringEncoding]; NSLog (@ "str% @", str);
std :: wstring sz = L "abc123 you and me"; wprintf (sz.c_str ()); printf ("\ n");
================= The first printed out, and the second print out, and why? Reply: While the first one can be printed, but in fact there is not szUnicode UTF32, look at its contents: <61000000 62000000 63000000 31000000 32000000 33000000 e4000000 bd000000 a0000000 e6000000 88000000 91000000 e4000000 bb000000 96000000> abc123 is no problem, but "you and me" these three words encoding is UTF8 encoding of each byte extended to 32, so szUnicode stuff inside is actually "abc123 you and me" corresponds to the UTF8 encoding wide character instead UTF32 From that perspective wprintf and printf, can only handle UTF8-encoded characters, can not handle UTF32
By calling http://xxx.xxx.xx.131:12000/_vti_bin/lists.asmx under GetListCollection get a list of all the data, but I just want a few fields of data, how to solve. For example, there are more than 40 fields, I just want to id, title, content, count four fields, seeking a master wing!
Reply: The obtained data saved to the array living dictionary, and then in the analysis can be ah Reply:
When I asked if there 10000 data, click on all the requests down, how can request a one thousand before it. Reply: Has been resolved, that is only the currently displayed page request data, and then again when the user drags the request.
The database has been added to the Resources group, after the release of the Document can not see the database is how is it? Reply: Files in the bundle, you can call that, if need to write, you can copy to the Document Reply: It is hoped in the Document, how to do it? Reply: Document Path: NSString * document = [NSHomeDirectory () stringByAppendingPathComponent: @ "Documents"]; Create a SQL file path: NSString * sqlFile = [document stringByAppendingPathComponent: @ "my.sqlite"];
Copy: NSString * sqlRes = [NSBundle mainBundle] pathForResource: @ "my" ofType: @ "sqlite"]; NSFileManager * fileManager = [NSFileManager defaultManager]; [FileManager copyItemAtPath: oldFile toPath: newFile error: nil]; This is your place in advance of the bundle.
If you want to put the outset Document, you use iTunes ah, iTools ah what tools drag and drop files directly into the well.
Reply: Generally present in the document is created, you can also be stored in the project path of the Resouse file path settings it. Reply: On the document can be downloaded in the way, put your files on the server, and then download it themselves define the path, you can download the document below it. You can also ITUNES or 91 and a series of software directly into your document next. It can also be packaged into your resource folder, and then run the program copied to your document below. As mentioned 3rd floor. Mainly to see why you want to put that folder, put there what to do, and so should be revised. It is working, I can QQ 359460138
This method deletes the corresponding cell Reply: Can you give a piece of code? Main section of tableview not know how to operate, that the data from the database out how segment display. Must give points!
Environment: xcode4.0, Interface Builder Objective: I think there is not MainWindow.xib create UITabBarController, change in another xib in Steps: 1 Create a pure Window Based Project
2 In xxxAppDelegate.h in to add a viewcontroller attribute (MainWindow.xib things I did not modify)
3 Add a customTab.xib
4 Specify customTab.xib the File's Owner to xxxAppDelegate
5 In customTab.xib, from the library dragged out a Tab Bar Controller
6 In customTab.xib, from the library dragged out an Object, custom class point xxxAppDelegate
7 related to the Tab Bar Controller Object (ie xxxAppDelegate) of viewcontroller
Start the project, I found UITabBar totally did not show up. What steps do I wrong Reply: Upgrade xcode it, now using a storyboard Reply: Because the default window.rootViewController still pointing viewController properties. You set those useless. The only way not just to achieve through the nib file, you can use code to write
Reply: You can try a storyboard Reply: I google for quite a while, and finally found really can not be displayed directly through the IB / start a non MainWindows.xib of UITabBarController, I have concluded on http://www.cocoachina.com/bbs/read.php?tid=125671 it.
Add UIAlertView agreement UIAlertViewDelegate In its delegate method can adjust the size of alert, the system default pop UIAlertView width and height, respectively, is how much? - (Void) willPresentAlertView: (UIAlertView *) alertView { alert.frame = CGRectMake (x, y, width, height); } Reply: Highly related to the content and your alert Reply: General simply pop up a warning? Its width height Reply: Is generally 280 * 177
Database uses FMDB found [NSString stringWithUTF8String: c] there is a memory leak But do not know how to deal online for a long time there is no clear solution? How to ask the great God who deal [NSString stringWithUTF8String memory leaks Reply: This question has not encountered one, Personal feeling you can completely circumvent this problem ah. char type not directly replace string okay? Reply: With FMDB a long time, did not find the problem Reply: Run about as long as you use the instruments that are reported leaked query Reply: May be your string is released. Find its address. Look pass the Senate, it is the memory address can be accessed Road
I have a storyboard ViewController (for the time being named FVc), I used the above two view, these two view I defined two UIViewController, and the two UIViewController with xib files were correlated, these two UIViewController for the time being named AVc and BVc, I Avc and BVc corresponding xib, in the view have increased on several UILable, then FVc the viewDidLoad method to AVc and BVc of view as a subview increased, but when running AVc the controls can realistically, BVc in not show how this is going? Part of the code is as follows, looking great God enlighten ah! FVc:
- (Id) init { if (self = [super init]) { self.view.backgroundColor = [UIColor brownColor]; / / phrase if one adds the words change color, but if you take in to view directly in the xib change the color look, you do not see / / NSLog (@ "frame.width =% f frame.height =% f", self.view.frame.size.width, self.view.frame.size.height); self.view.frame = CGRectMake (201,0, self.view.frame.size.width - 1, self.view.frame.size.height); } return self; }
BVc.view this area are shown in the FVc.view color, the color does not show BVc.View and above UILable not displayed, AVc.view area on no problem. Reply: Their top, help ah Reply: Why storyboard it? 4.3 are not up and running Reply: If you use IBout what's statement, then you do not need to continue to go in ViewDIdLoad alloc and init a new class of. You should ViewController init method, do some AddSubView operation.
I think the same category ViewController, you generate two times, that is, there are two in the same category ViewController, one identifies you to XIB, then ViewDidLoad the time, and there is no corresponding AddSUbView to your logo ViewController, but the identification ViewController to a new generation on.
Music files have been placed under the Resources folder, there is no problem playing music files manually Reply: Not the resources exist on the can. Need to load the next. The following is a specific code: SimpleAudioEngine :: sharedEngine () -> preloadEffect ("pew-pew-lei.caf"); Reply: This does not matter, it should be formatting issues, preload preload only, play cards when it is not, you can directly play
/ / Set the Content-length [Request addValue: msgLength forHTTPHeaderField: @ "Content-Length"]; / / Set the request type POST or GET [Request setHTTPMethod: @ "POST"]; NSString * soapMessage = @ "a = 1 & b = 2 & c = 3"; / / Set the request Body (only post way there) [Request setHTTPBody: [soapMessage dataUsingEncoding: NSUTF8StringEncoding]];
/ / Then NSURLConnection
Reply:
I now realize the code is as follows: NSString * myRequestString = @ "[2012112618351111, T21, 2,18 @ 111111111111111111 @ 222222222222222222 @ 333333333333333333]"; NSData * myRequestData = [NSData dataWithBytes: [myRequestString UTF8String] length: [myRequestString length]]; NSURL * url = [NSURL URLWithString: @ "http://211.140.2.123:8080/terminal/gprs"]; ASIFormDataRequest * request = [ASIFormDataRequest requestWithURL: url];
1 The compiler does not respond warned setHTTPBody(2) After running emerge [ASIFormDataRequest setHTTPBody:]: unrecognized selector sent to instance error May I ask how to solve this big cow?
But I still want to know when I am using ASIFormDataRequest where the problem lies! ! Reply: Well above just quoted the wrong floor, I use two methods NSMutableURLRequest
Want to own to develop a simple 3D rotation effect, similar to the (not advertising): http://v.youku.com/v_show/id_XNDcyNjM4NzUy.html http://www.mwebgl.com/contentpage/3DShow.html http://v.youku.com/v_show/id_XMzIxODY3MjUy.html They are inserted into the flash animation you? Does not mean iphone / ipad does not support flash, and if you want to develop something similar on ipad, what technology to use, or use the IOS what kind of API? Reply: You can also achieve this either you use the picture pile up or to use opengl Reply: This implementation in cocos2d in good implementation. . .
Another is upstairs, openGL, can also be achieved. 3d three-dimensional animation, read a similar rotation demo.
I expected "i is 123" in console, but I only got "i is 109952". Why
Reply: [A i] returns a NSNumber pointer, you use% d output is of course is an integer pointer. For all NSObject objects, all with% @ output: NSLog (@ "i is% @", [a i]); Or you want to use% d, it will turn into a value of type int: NSLog (@ "i is% d", [a i]. IntValue);
Is to use google maps will appear when the real gps coordinates and map display position different situations, because there exist coordinates Mars. See Baidu coordinate on Mars. Mars will now be given real gps gps turn queries the database query method using c # write a example project.
http://download.csdn.net/detail/zzzili/4783537 Reply: google maps when there will be real gps coordinates and map display position different situations This should be a map of the heavenly home deflection if you put a GPS data to match with google erath the next should be very accurate
I often do the mobile terminal GPS positioning more clearly on this issue Reply: Ah, yes. I now share a database lookup, is to solve the gps data into the map and display inaccurate.
hi, I am a novice developers want to debug what the real machine, but the occurrence of this problem has not been resolved, please know that children's shoes to help me
The identity 'iPhone Developer' doesn't match any valid, non-expired certificate / private key pair in your keychains
Reply: Real machine must have a developer account Debugging Reply: I have a developer account; ipad at my computer above the others on a program compiled successfully, but I own the air above it is also how compilation is unsuccessful, because always prompt such as the title wrong; Reply: Your account was in someone else's computer installed? It was from that computer to re-export certificate, or to re-generate the certificate in the provisioning portal Reply:
Thank you for my answer!
In someone else's computer to run off, but someone else's account is used to run; My mini on both computers are running successful, in my air does not succeed, others running on the computer, nothing configuration, directly on ok, depressed! Also, ask above two is not to be added by the administrator !
Certificates The administrator has added over;
Devices that my side did not show my ipad, but running a successful person's account which will have my ipad, do not know how it is!
Such two kinds of writing can be read and distinguish it Reply: proprety belongs to abstraction, physical variables are stored in the structure of the tank, under normal circumstances, other objects can not access them directly. The property is the object's attributes, can be accessed. In addition, property can be returned or send an instance variable, see the following example
Assuming the code name already exists and has two parts (eg such as Bill Gates instead Gates this) Reply: JAVA in member variables and attributes.
Reply: In Object-c add attributes, programmers typically define a number of methods used to set and retrieve the class instance variables have the value of these methods is called access methods and modify the method can also be called getter and setter methods (java in called the set and get methods). But the @ property declaration lets you say goodbye to boring access methods and modification method. We typed in the interface file @ property declaration and implementation file (@ synthesize) the combination of another statement, you can tell the compiler at compile time to create getter and setter methods.
I print out the path is / var/folders/ps/h2qdg_7n6z5fqhs8brslfh3r0000gn/T / But I did not find the path to our surprise there ah Reply: You compile with real machine or virtual machine?
Reply: I use a virtual machine Reply:
So you are present in your computer. / Var is a hidden file, you can set the folder for the entire show or Press the key combination command + Shift + G, and then in the dialog box to copy into your path, carriage, went to that folder a
Virtual Machine installed successfully, follow the tutorial to configure mac os virtual machine environment (Darwin. Iso file as a guide), Virtual machines can not find the boot prompt after start of the class file, you can determine the virtual machine boot from the CD, And CD-ROM configuration is darwin.iso, wrong in what place? darwin.iso file in question, Or something else Reply: Using the latest version of vmware workstation package, but need to find a crack, mac systems can be installed again, the other installed directly on the line. Reply: Using Rebel EFI.iso prompted to insert the virtual machine starts Mac OS installation disk in the virtual machine settings have been set on the Mac OS.dmg, and check the device status, and it seems Mac installation process starts, the screen prompts to wait for mac os Records, but waited a very long time, nothing happened, ah, Editor's Note. Reply:
Installed 8.0, registration code entered successfully, still not good ah, ye so Fei thing Reply: vmware workstation latest version 9.X, and there are problems with 8 Reply:
Thank you for attention, the use of VM9 and registered properly, still the same ah. Reply: Or do not use a virtual machine, the speed is too slow, a variety of toss, iOS developers still use mac Reply: vmware, go directly to the google search image file downloads back to be able to use, no installation. Many times, a few try, there will always be usable. If it is AMD's CPU is recommended to download the following version 10.6, high version can not be used. 6th Floor, cited the words: still do not use a virtual machine, the speed is too slow, all kinds of torment, iOS developers still use mac 2G memory recommendations or abandon it, simply do not use, the death card. Installing linux is also good, recommended to install linux mint. Reply:
This is now my situation ah ... I do not know how to do, fellow now resolved it? Seek guidance Reply: I suggest you install a real machine. . . I toss a half finally broke the tops Well ML, is a real machine version, in addition to graphics too old can not drive outside (personally do not want to engage in, and can be used on the line), the other is better. . . Indeed much better than the broken VM. . .
Thank you Reply: project using ARC, not retian, release god of horses do not. The compiler will automatically add. Concrete can Baidu ARC explain.
If you want to close the ARC, this time, you can compile the project settings "Objectice-C Auto Reference Counteting" set to NO. As follows.
Reply: That I do not know the compiler automatically adds good, or good handwriting? Reply: Handwritten personal habits, need to be familiar with the ARC ARC some statements.
Internet under the source code, which contains certificates, can not be published to the real machine, how to eliminate this certificate? Reply: xcode build settings in the signing certificate into their own Reply: Upstairs solution. In the target in the build setting options to find the certificate where the certificate can be replaced with your own.
- (Void) application: (UIApplication *) application didReceiveRemoteNotification: (NSDictionary *) userInfo { NSString * message = @ ""; id alert = [userInfo objectForKey: @ "alert"]; if ([alert isKindOfClass: [NSString class]]) { message = alert; } Else if ([alert isKindOfClass: [NSDictionary class]]) { message = [alert objectForKey: @ "body"]; } NSLog (@ "% @", message); } These are my source code. Problem Description: I am using pushMeBary to my application made a push message, this time my program was tested on the real machine, xcode debug indeed entered the delegate method, but I print out the message has been displayed as null. I thought it was not running, so the message saved to a local, again send push message received, to open a file on a real machine, the file does exist, but there is no content. Where can I find the problem, carefully described, thank you! ! NSString * documentsDirectory = [NSHomeDirectory () stringByAppendingPathComponent: @ "Documents"]; NSString * filePath = [documentsDirectory stringByAppendingPathComponent: @ "pushinfo.plist"]; NSMutableArray * array; if ([[NSFileManager defaultManager] fileExistsAtPath: filePath]) { array = [[NSMutableArray alloc] initWithContentsOfFile: filePath]; if (array.count == 0) { [Array addObject: message]; } else { [Array insertObject: message atIndex: 0]; } } else { array = [[NSMutableArray alloc] init]; [Array addObject: message]; } [Array writeToFile: filePath atomically: YES]; Reply: When you write this alert using pushMeBary Mody? ... Also, you say pushMeBaby do? Give you a connection https://github.com/stefanhafeneger/PushMeBaby
In addition, you recommend a very detailed guide, but it is in English http://mobiforge.com/developing/story/programming-apple-push-notification-services Reply:
Oh, and in addition, in order to make sure you write alert, I put the payload information to write it out {"Aps": {"alert": "This is the alert message.", "Badge": 1}} Reply: Hello, the problem is found, the original is not lost I aps, so if userInfo to find directly in the alert is not found, it may first have to find aps, aps contents inside. Carefully read the payload will reveal a problem.
First, the first one, to generate a variable dictionary (assuming address is 0x000001) Second sentence, an address to you vice item, then you have just generated 000001 will be found. . . NSObject * obj = [array objectAtIndex: row] (assuming address 000002) item address is 000002.000001 not visit your old address, and became a physical presence but not get access address (memory leaks, there arc exceptions)
You should: item addEntributeFrom: (NSDictionary *) dic 000002 000001 Address was added inside the dictionary dictionaries have attributes. . . .
This method name is numberOfRowsInSection, Brother expressed method is used to return a string of the front part of marking do not understand what this means Reply: The name of the method called tableView: numberOfRowsInSection: Note that the two colons, which is objective-c syntax Reply: The method begins with tableView (table operations agent function) there are many, Author here is tableView (large classification) under the premise of emphasis on this numberOfRowsInSection (subcategories) function. Understand the author's meaning like, without deduction of those few words.
Xcode 4.5.2, iOS6 SDK, such as publishing to iphone6 simulator no problem, publish the collapse to 5.1 'NSUnknownKeyException', reason: '[<__NSCFString 0x6a9d6b0> setValue: forUndefinedKey:]: this class is not key value coding-compliant for the key searchBar.'
Not to say that the previous 5.1 before they can use NSURL * url = [NSURL URLWithString: @ "prefs: root = WIFI"]; [[UIApplication sharedApplication] openURL: url]; So url to access the system settings do?
Why twitter settings page will pop up, then you can enter into the system settings, This is for the hair? I compare dish. Novice! Find discussions! ! Seeking guidance!
Reply: twitter is not the same as it should be built, the general application of 5.1 after having such a function? Reply:
Thank you for your enthusiastic response. But also because I think he is built in, so you can enter through the alert settings, I just want to know the common application can achieve this functionality? Or indirectly accomplish this function? I would like to guide the user to set the time to guide the user to switch Wi-Fi operation. Reply:
After general applications should not be a 5.1, google a bit to see someone asked on stackoverflow Apple technical support, and finally a http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme
NSDate * toDate = [[NSDate alloc] initWithString: @ "2000-10-10 12:00:00 -0500"]; Errors are No Visible @ interface for 'NSDate' declares the selector 'initWithString:' This is why, seeking Daniel explained. Reply: Wood has this interface. Look api, or add their own. Reply: Without this interface, -!
NSString * a = @ "asd"; NSData * data = [a dataUsingEncoding: <# (NSStringEncoding) #>];
I know that there are three ways to call the system call can be realized: 1. NSString * callString = [NSString stringWithFormat: @ "tel:% @", number]; [[UIApplication sharedApplication] openURL: [NSURL URLWithString: callString]]; This will pop-up boxes, but after the kick does not automatically return to our application
But behind these two, they will first pop up a message box out how to put this prompt steps to remove ah, I see the QQ address book is done Reply: Do not understand. . .
Is not to be considered ABAddressbook UI controls? This control was called out display contacts that have phone contact information, click the phone number that line cell, can be directly dialed. . . . Reply: number has been given, do not need to go to find contacts, but still thank you for your answer.