Sunday, September 29, 2013

Solving problems on the IOS page Jump

First attach a picture


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

iphone how to dynamically generate a phone number to dial

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

NSString url = [[NSString alloc] initWithFormat: @ "tel:% @", number];
[[UIApplication sharedApplication] openURL: url];



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];


Reply:
NSURL * url = [[NSURL alloc] initWithString: [NSString stringWithFormat: @ "tel:% @", number]];
[[UIApplication sharedApplication] openURL: url];

Reply:
shi de
Reply:
2nd Floor positive solution, you have to pass a url into ah. Pass a nsstring certainly not acceptable.

Iphone application how to export the material?

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

Apple program can do with java development

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.

Map customize some of the problems

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

OC in NSInteger and int differ ah?

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

Development, debugging environment-related

posts by yingkou on 2012-10-10 16:50:38 Edit
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)

Help gets about it

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

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

iPhone FFmpeg video playback is not smooth

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.

coredata 1 to many relationship

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.

Insert the code below.

NSManagedObject * main = [NSEntityDescription insertNewObjectForEntityForName: @ "Company" inManagedObjectContext: self.managedObjectContext];
[Main setValue: @ "OK" forKey: @ "name"];

NSManagedObject * dpt1 = [NSEntityDescription insertNewObjectForEntityForName: @ "Department" inManagedObjectContext: self.managedObjectContext];
[Dpt1 setValue: @ "A" forKey: @ "deptName"];

NSManagedObject * dpt2 = [NSEntityDescription insertNewObjectForEntityForName: @ "Department" inManagedObjectContext: self.managedObjectContext];
[Dpt2 setValue: @ "B" forKey: @ "deptName"];

Insert the anomaly in the relationship. How does this relationship value assignment.
[Main setValue: dpt1 forKey: @ "dept"];


Establish a good table structure
company z_pk, z_ent, z_opt, zname
department z_pk, z_ent, z_opt, z3dept , zdeptname

But do not know how to set up two tables-many relationship. Still do not know how the value assigned z3dept.

Please expert guidance.

For message push device token problems

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:
quote 1 floor 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

Positive solution.
Apple will need to get yourself a token, given their own servers.
Reply:
quote 1 floor 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

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:
4th Floor reply quote:
need to save up.
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);

for (Device device: devices) {
System.out.println ("Inactive device:" + device.getToken ());
}
} Catch (CommunicationException e) {
e.printStackTrace ();
} Catch (KeystoreException e) {
e.printStackTrace ();
}
}

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:
quote 1 floor 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





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?

How to use UIViewController frame by frame rendering?

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

xCode version can downgrade it?

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!

How to display a chart in a UIView?

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];

Mac desktop app development issues NSBrowser usage

I set the Browser's Max Cols is 2.
Use a proxy
- (Int) browser: (NSBrowser *) sender numberOfRowsInColumn: (int) column
{}

I found that when first initialized only return the first row of data. The second row is not initialized.

I was not there again is not set? Or? I need a second line of some default values.

Also NSBrowser demo I can not find the relevant official explanation rarely? Seeking recommendations related demo and information

Reply:
The browser in the end how to set the default selected value ah?
Reply:
There are examples ah, search SimpleCocoaBrowser, ComplexBrowser

NSString into UInt16 data type

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

home button to exit the application, and then click Apply to which system will call the method?

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];
}

Double-click the event UITabBarController

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?


Daren seeking solutions?
Reply:
NSObject
|
UIBarItem
|
UITabBarItem

So it is without this feature.

UIBarButtonItem because there are a method:
- (Id) initWithCustomView: (UIView *) customView;


So that it can be.

Reply:
There ah. You can interpret it clicks, gestures, multi-touch "is a double-
Reply:
2F reply quote:
have ah. You can interpret it clicks, gestures, multi-touch "one is double

Seems UITabBarItem can not add gestures? Solution. . . . There Sha method ~ ~
Reply:
Find a solution of the ~ ~ ~ ~
 
- (BOOL) tabBarController: (UITabBarController *) tbc shouldSelectViewController: (UIViewController *) vc {
UIViewController * tbSelectedController = tbc.selectedViewController;

if ([tbSelectedController isEqual: vc]) {
/ / Here you can catch this method
return NO;
}
/ / NSLog (@ "1");
return YES;
}

Why simulator can normally receive UDP broadcasts, but can not receive broadcast on a real machine

I send and receive UDP is a small program

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

Gateway is 192.168.1.1

Variable with @ property (nonatomic, copy) defined, there is a need in the @ interface defined in it? Here defined variables defined with @ property change

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

iOS recording of the problem

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

Xcode how to turn char wchar

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

iphone multithreading problems, experts please enter.

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 camera development issues

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

[Original] [Voice Video Tutorial] virtual machine installed Mac os 10.7.3 and Xcode4.3.2 IOS development environment to build

posts by g00d_will on 2012-07-24 08:50:01 Edit
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.

Watch online address:
Youku album
http://www.youku.com/playlist_show/id_17888939.html




HD video and Tools Download

Thunder fast pass Address:

http://kuai.xunlei.com/d/TNEMZFDTLUVG?cachetime=1342843400617

Extraction code: TNEMZFDTLUVG


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

ios segue

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
 [self performSegueWithIdentifier: @ "segueIdentifier" sender: self]; 


But the effect is the same: to achieve Jump
Reply:
Segue useful, but have not heard of such a classification landlord segue

ipad What can remotely connect Linux server

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

The title issue UINavigationController

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";

Try this okay

Reply:
landlord reply quote:
UINavigationController + UITabBarController both used together. .
Why is the title of the navigation happens not set on it. . .

Not ah.
Reply:
 
- (Id) init {
self = [super initwithNibName: nil bundel: nil];
if (self) {
self.title = @ "111";
UITabBarItem * tbi = [self tabBarItem];
[Tbi setTitle: @ "222"];
}
return self;
}


Try this.
Reply:
2F reply quote:
quote reply landlord:
UINavigationController + UITabBarController both used together. .
Why is the title of the navigation happens not set on it. . .

Not ah.


He will put the name of tabbar modified. . . Navigation bar or not
Reply:
quote 1 floor reply:
in each controller's init function add
self.navigationItem.title = @ "controller title";

Try this okay


Not ah. .
Reply:
3rd Floor reply quote:
Java code

- (Id) init {
self = [super initwithNibName: nil bundel: nil];
if (self) {
self.title = @ "111";
UITabBarItem * tbi = [self tabBarItem];
[Tbi setTitle: @ "222"];
}
ret ......


Navigation bar above or not. .
Reply:
Your UINavigationController + UITabBarController is how to use
Reply:
7th floor beijinuo reply quote:
your UINavigationController + UITabBarController is how to use


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;

_nav = [[UINavigationController alloc] initWithRootViewController: self.tabBar];
[Self.window addSubview: self.nav.view];

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:
8th Floor like7xiaoben reply quote:
reference 7th floor beijinuo reply:
Your UINavigationController + UITabBarController is how to use

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 ......


I wrote an example pass up, you see is not what you want
http://download.csdn.net/detail/beijinuo/4734208
Reply:
9th floor numbbuaa reply quote:
you try self.tabBar.title = @ "***", Also, I think you designed this structure some problems, it is best to join tabbarcontroller navigation view controller inside, tabbarcontroller as the topmost


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. . .

How to import packages IOS project

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:
4th Floor hjue reply quote:
these two packages are used directly source, no link binary
Directly from the finder. H and. M files onto xode project on it

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:
5th Floor wei__cn reply quote:
4th Floor hjue quote reply:
These two packages are used directly source, no link binary
Directly from the finder. H and. M files onto xode project can be
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 make ......


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.

[IPad] on the storyboard in popover segue to transfer data using a problem

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

 
- (Void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender {

BViewController * destination = [segue destinationViewController];
destination.object = @ "aaaaaaaaaaa";

}


Reply:
4th Floor hjue reply quote:
can prepareForSegue set B attributes to achieve

Objective C code12345678-(void) prepareForSegue: (UIStoryboardSegue *) segue sender: (id) sender {BViewController * destination = [segue destinationViewControl ......

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

mac foundation problem neighborhoods

posts by huayy on 2012-11-06 17:05:36 Edit
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.
/ /

# Import

@ Interface ViewController: UIViewController
@ Property (weak, nonatomic) IBOutlet UIWebView * lz_web;
@ Property (weak, nonatomic) IBOutlet UIStepper * lz_jia;
@ Property (weak, nonatomic) IBOutlet UISlider * lz_hdt;
@ Property (weak, nonatomic) IBOutlet UIImageView * lz_image;
@ Property (weak, nonatomic) IBOutlet UITextField * lz_textbox;
@ Property (weak, nonatomic) IBOutlet UILabel * lz_label;
@ Property (weak, nonatomic) IBOutlet UIButton * lz_button;

- (IBAction) helloworld: (id) sender;
- (IBAction) hd: (id) sender;
@ End



/ /
/ / ViewController.m
/ / Test
/ /
/ / Created by xxx on 12-9-19.
/ / Copyright (c) 2012 å¹´ xxx. All rights reserved.
/ /

# Import "ViewController.h"

@ Interface ViewController ()

@ End

@ Implementation ViewController
@ Synthesize lz_web;
@ Synthesize lz_jia;
@ Synthesize lz_hdt;
@ Synthesize lz_image;
@ Synthesize lz_textbox;
@ Synthesize lz_label;
@ Synthesize lz_button;

- (Void) viewDidLoad
{
[Super viewDidLoad];
/ / Do any additional setup after loading the view, typically from a nib.
}

- (Void) viewDidUnload
{
[Self setLz_button: nil];
[Self setLz_label: nil];
[Self setLz_textbox: nil];
[Self setLz_image: nil];
[Self setLz_hdt: nil];
[Self setLz_jia: nil];
[Self setLz_web: nil];
[Super viewDidUnload];
/ / Release any retained subviews of the main view.
}

- (IBAction) helloworld: (id) sender
{
lz_web.userInteractionEnabled = true;
/ / Navigate to google
[Lz_web loadRequest: [[NSURLRequest alloc] initWithURL: [[NSURL alloc] initWithString: @ "http://www.google.com"]]];
lz_label.text = @ "ccc";

}
- (IBAction) hd: (id) sender
{
lz_image.alpha = lz_hdt.value;
}


- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation
{
return (interfaceOrientation! = UIInterfaceOrientationPortraitUpsideDown);
}

@ End


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

See in particular article PhoneGap Application Development Strategies: How Apple audit?

Can you get Itune data

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

This post has the things you need.

Playing on the audio flow problems openal

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

Add the login screen problem

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

Progress bar linkage problem

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




openal problem playing a live audio stream


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?

PDF files in iOS synthesis

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.

Get the original PDFDocumentRef:
 
CGPDFDocumentRef WQGetPDFDocumentRef (NSString * filename)
{
CFStringRef path;
CFURLRef url;
CGPDFDocumentRef document;
size_t count;

path = CFStringCreateWithCString (NULL, [filename UTF8String], kCFStringEncodingUTF8);
url = CFURLCreateWithFileSystemPath (NULL, path, kCFURLPOSIXPathStyle, 0);

CFRelease (path);
document = CGPDFDocumentCreateWithURL (url);
CFRelease (url);
count = CGPDFDocumentGetNumberOfPages (document);
if (count == 0) {
printf ("[% s] needs at least one page! \ n", [filename UTF8String]);
return NULL;
}
return document;
}


Then draw a new one, the first draw of the original pages of information and then draw pictures
 
/ / Draw pictures to give you package up a method
void drawPicture (CGContextRef myContext, CGRect rect, UIImage * image)
{
CFDataRef imgData = (__bridge CFDataRef) (UIImagePNGRepresentation (image));
CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData (imgData);
CGImageRef imageRef = CGImageCreateWithPNGDataProvider (dataProvider,
NULL,
NO,
kCGRenderingIntentDefault);

CGContextDrawImage (myContext, rect, imageRef);
CGDataProviderRelease (dataProvider);
CGImageRelease (imageRef);
}

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.

Good night.

uipickerview height problem

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:
quote 1 floor darkdong reply:
UIPickerView height seems to be fixed

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

Compiled on the mac platform. A library file in xcode on how to use?

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 ~

xcode under windows can not access the web services to build

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?

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:
quote 1 floor darkdong reply:
compiler supports c + +, objc mixed, and change the extension to. mm on the line

Sure you can compile C + + stl contain code that you
Reply:
OK, boost can be
Reply:
4th Floor xiaoguailong3 reply quote:
references 3rd floor darkdong reply: OK, boost can Hey, boost is to encapsulate the underlying lot is c. .

boost is not used to write c, which is quasi-c + + standard library

Pure C code, how to call a method in Object-C?

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:
quote 1 floor darkdong reply:
same, the objc object passed as a parameter of type pointer to c function like

C source file is not recognized objc object pointer, if the header files into objc bunch of errors occur.
Reply:
cited two floor M_ChangGong reply:
quote 1 floor darkdong response: the same, the objc object passed as a parameter of type pointer to c function like
C source file is not recognized objc object pointer, if the header files into objc bunch of errors occur.

In the. M write c function
Reply:
3rd floor darkdong reply quote:
2F M_ChangGong reply quote: quote 1 floor darkdong response: the same, the objc object as a parameter of type pointer c function like
passedC source file is not recognized objc object pointer, if the header files into objc bunch of errors occur.
In the. M write c function

Try, now C code in a static library are. C file.

MPMusicPlayerController

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

IPhone screen orientation

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://blog.csdn.net/dongge_111/article/details/7394950

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:

 - (NSUInteger) supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}



In the vertical screen ViewController added:

 - (NSUInteger) supportedInterfaceOrientations {
return UIInterfaceOrientationMaskPortrait;
}

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

Section 5
Reply:
http://blog.csdn.net/duxinfeng2010/article/details/8024379

xcode can not be assigned directly to wstring What? eg: std :: wstring sz = L "abc123 you and me."

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);


Reply:
 
# Include
# Import

class CStringConverter {
public:
static std :: wstring Ansi2Unicode (std :: string szAnsi) {
NSString * szNs = [NSString stringWithCString: szAnsi.c_str ()];
return Ns2Unicode (szNs);
}
static std :: string Unicode2Ansi (std :: wstring szUnicode) {
NSString * szNs = Unicode2Ns (szUnicode);
const char * rs = [szNs cString];
return rs;
}

static std :: wstring Utf82Unicode (std :: string szUtf8) {
NSString * szNs = [NSString stringWithUTF8String: szUtf8.c_str ()];
return Ns2Unicode (szNs);
}
static std :: string Unicode2Utf8 (std :: wstring szUnicode) {
NSString * szNs = Unicode2Ns (szUnicode);
return [szNs UTF8String];
}

static std :: string Ansi2Utf8 (std :: string szAnsi) {
return Unicode2Utf8 (Ansi2Unicode (szAnsi));
}
static std :: string Utf82Ansi (std :: string szUtf8) {
return Unicode2Ansi (Utf82Unicode (szUtf8));
}

static std :: wstring Ns2Unicode (NSString * szNs) {
if (! szNs) return L ""; / / note: wchar_t is utf32 under mac
const char * szUtf8 = [szNs UTF8String];

setlocale (LC_ALL, "");
/ / Calc block size to be returned
int len ​​= mbstowcs (0, szUtf8, 0);
/ / Malloc and fill the returned block
wchar_t * szUnicode = new wchar_t [len + 1];
mbstowcs (szUnicode, szUtf8, len);
szUnicode [len] = 0;
std :: wstring rs = szUnicode;
delete [] szUnicode;

return rs;
}
/ / Return value is autorelease, besure do not need to invoke NSString's release
static NSString * Unicode2Ns (std :: wstring szUnicode) {
setlocale (LC_CTYPE, "");
/ / Calc block size to be returned
int len ​​= wcstombs (0, szUnicode.c_str (), 0);
/ / Malloc and fill the returned block
char * szUtf8 = new char [len + 1];
wcstombs (szUtf8, szUnicode.c_str (), len);
szUtf8 [len] = 0;
NSString * rs = [NSString stringWithUTF8String: szUtf8];
delete [] szUtf8;

return rs;
}
};


 
std :: string szUtf8 = "abc123 you and me";
std :: wstring szUnicode = CStringConverter :: Utf82Unicode (szUtf8);
wprintf (szUnicode.c_str ());
printf ("\ n");

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

Sharepoint mobile application developers, there's the question returns the specified data.

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!

SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/GetListCollection"







Reply:
The obtained data saved to the array living dictionary, and then in the analysis can be ah
Reply:
quote 1 floor reply:
the obtained data saved to the array living dictionary, and then in the analysis can be ah

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.

Designed sqlite database on how to publish to iphone?

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

How do I delete the tableview with a section of a record?

Such as contacts. Novice, no ideas, Give me an example
Reply:
Delete the data source inside the recording, then use

- (Void) deleteRowsAtIndexPaths: (NSArray *) indexPaths withRowAnimation: (UITableViewRowAnimation) animation;

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!

cocos2dx how references mach.h

If that
cocos2dx down how include "math.h" it?
I include, but using math.sin (10)
Still no response. . .
Reply:
# Include "math.h"

double a = sin (30.0);

So used

UITabBar not showing up

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

NSMutableArray * controllers = [NSMutableArray array];

FirstViewController * firstVC = [[FirstViewController alloc] init];
[Controllers addObject: firstVC];
[FirstVC release];

SecondViewController * secondVC = [[SecondViewController alloc] init];
[Controllers addObject: secondVC];
[SecondVC release];

.......
/ / Create the UITabBarController
UITabBarController * tabBarController = [[UITabBarController alloc] init];
[TabBarController setViewControllers: controllers];

self.window.rootViewController = tabBarController;
[TabBarController release];



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.

Saturday, September 28, 2013

The default size is the number of pop-up UIAlertView?

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:
quote 1 floor hjue reply:
height and alert you about the content
General simply pop up a warning? Its width height
Reply:
Is generally 280 * 177

[NSString stringWithUTF8String memory leaks

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

xib control Why drag in the above program execution time can not see ah, view to set the background color is useless?

posts by gscool on 2012-11-21 08:12:28 Edit
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:
 
- (Void) viewDidLoad
{
[Super viewDidLoad];

if (AVc == nil)
{
AVc = [[AVCViewController alloc] init];
}
[Self.view addSubview: AVc.view];


if (BVc == nil)
{
BVc = [[BVCViewController alloc] init];
}
[Self.view addSubview: BVc.view];
}


AVc:
 
- (Id) init
{
if (self = [super init])
{
self.view.backgroundColor = [UIColor brownColor];
/ / NSLog (@ "frame.width =% f frame.height =% f", self.view.frame.size.width, self.view.frame.size.height);
self.view.frame = CGRectMake (0,0,200, self.view.frame.size.height);
}
}


BVc:
 
- (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.

shell Script Invocation Error

shell Script Invocation Error
/ Users / rjxyrjxy / Desktop / iPhone / TemporaryItems / Diceshaker.build / Debug-iphonesimulator / Update Localizations.build/Script-154232570E6F3BA800335D5C.sh: line 2: / BuildLocale: No such file or directory
How to solve? ? ?

cocos2d-x to play music

I was converted from cocos2d-iphone cocos2d-x functions in playback music, no sound, I do not know why, the following code

CocosDenshion :: SimpleAudioEngine :: sharedEngine () -> playEffect ("pew-pew-lei.caf");

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

ASIHttpRequest POST data queries

I want to use to achieve the following functions
ASIHttpRequest
POST HTTP/1.1 http://www.163.com
HOST: www.163.com
ContentLenght: 10

aaaaaaaaaa


Assumption is more like this, then I ask how I used ASIHttpRequest to organize the data above it?

First use ASIHttpRequest know much, thank!
Reply:
POST organizational data should be used ASIFormDataRequest
Reply:
 
Probably wrote
NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL: @ "htttp :/ /"
cachePolicy: NSURLRequestUseProtocolCachePolicy
timeoutInterval: 60.0];

[Request addValue: @ "text / xml; charset = utf-8" forHTTPHeaderField: @ "Content-Type"];

[Request addValue: @ "http://tempuri.org/GetSmsVerifyCodeInfo" forHTTPHeaderField: @ "SOAPAction"];

/ / 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:
quote 1 floor darkdong reply:
POST should use ASIFormDataRequest organize data



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];

[Request setRequestMethod: @ "POST"];
[Request setHTTPBody: myRequestData];

[Request addRequestHeader: @ "User Agent" value: @ "13800138000"];
[Request addRequestHeader: @ "Host" value: @ "http://211.140.2.123:8080/terminal/gprs"];

[Request setDelegate: self];
[Request startAsynchronous];

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?

Reply:
Usage:
ASIFormDataRequest * request = [ASIFormDataRequest requestWithURL: url];
[Request setPostValue: @ "Ben" forKey: @ "first_name"];
[Request setPostValue: @ "Copsey" forKey: @ "last_name"];
[Request setFile: @ "/ Users / ben / Desktop / ben.jpg" forKey: @ "photo"];
Reply:
4th Floor darkdong reply quote:
Usage:
ASIFormDataRequest * request = [ASIFormDataRequest requestWithURL: url];
[Request setPostValue: @ "Ben" forKey: @ "first_name"];
[Request setPostValue: @ "Copsey" forKey: @ "last_name"];
......


Use this method you have achieved thanks!


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

About iphone / ipad 3D rotation effects

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.

why NSNumber didn't show correct number

Sorry, my company mac is English version, so I have to speak English in CSDN even though I'm Chinese.
Here is my code.

A.h
 # import  


@ Interface A: NSObject {
NSNumber * i;

}
@ Property (retain) NSNumber * i;

@ End

 # import "A.h" 


@ Implementation A
@ Synthesize i;

- (Void) dealloc {
[I release];
[Super dealloc];
}

 # import  
# Import "A.h"

int main (int argc, const char * argv []) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

A * a = [[A alloc] init];

NSNumber * i = [[NSNumber alloc] initWithInt: 123];

[A setI: i];

NSLog (@ "i is% d", [a i]);
[Pool drain];
return 0;
}


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);

GPS coordinates of the real coordinate transformation Mars query the database (google)

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.

The identity 'iPhone Developer' doesn't match any valid, non-expired certificate

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:
3rd floor darkdong reply quote:
your account in someone else's computer once installed? It was from that computer to re-export certificate, or go to provisioning portal where regenerate certificates

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!

IOS problems in nsstring

posts by wenwei19861106 on 2012-12-03 12:28:38 Edit
First, I am. H, he wrote
 # import  

@ Interface wenViewController: UIViewController {
NSString * key;

}

I am. M files can be accessed and modified pieces key
The second method is. H file write
 # import  

@ Interface wenViewController: UIViewController {
NSString * key;

}
@ Property (nonatomic, retain) NSString * key;

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

 @ interface Person: NSObject {
NSString * name;
}

@ Property (copy) NSString * name;
@ Property (copy) NSString * firstName;
@ Property (copy) NSString * lastName;
@ End

@ Implementation Person
@ Synthesize name;

- (NSString *) firstName {
[[Name componentsSeparatedByString: @ ""] objectAtIndex: 0];
}
- (NSString *) lastName {
[[Name componentsSeparatedByString: @ ""] lastObject];
}
- (NSString *) setFirstName: (NSString *) newName {
NSArray * nameArray = [name componentsSeparatedByString: @ ""];
NSArray * newNameArray [[NSArray arrayWithObjects: newName, nil] arrayByAddingObjectsFromArray: [nameArray subarrayWithRange: NSMakeRange (1, [nameArray size] -1)]];
self.name = [newNameArray componentsJoinedByString: @ ""];
}
- (NSString *) setLastName: (NSString *) newName {
NSArray * nameArray = [name componentsSeparatedByString: @ ""];
NSArray * newNameArray [[nameArray subarrayWithRange: NSMakeRange (0, [nameArray size] -2)] arrayByAddingObjectsFromArray: [NSArray arrayWithObjects: newName, nil]];
self.name = [newNameArray componentsJoinedByString: @ ""];
}
@ End


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.

NSTemporaryDirectory () problem

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:
cited two floor jiangyuaiqing reply:
you compile with real machine or virtual machine?
I use a virtual machine
Reply:
3rd floor wenwei19861106 reply quote:
cited two floor jiangyuaiqing reply: You compiled with real machine or a virtual machine? I use a virtual machine


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

Install mac os virtual machine error occurred

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:
quote 1 floor ultrapro reply:
vmware workstation with the latest version of the package, but need to find a crack, mac systems can be installed again, the other installed directly on the line .

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:
4th Floor ultrapro reply quote:
vmware workstation latest version 9.X, and there are problems with 8

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:
cited two floor yingkou reply:
using Rebel EFI.iso prompted to insert the virtual machine starts Mac OS installation disk in the virtual machine settings are already set 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.


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. . .

error: 'release' is unavailable: not available in automatic reference counting

May I ask what this is a mistake

The how to correct

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.

How to eliminate the source code development certificate?

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.

Help: How to receive push information?

- (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:
quote 1 floor langyufei reply:
you wrote this alert when 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-pu ......


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.

XCODE4.2 achieve a simple picture display function

iPhone apps in Xcode4.2 write, there is automatic memory recovery

Implementation: There is a button, when clicked pictures replaced 2.jpg

Button event has already bound interface buttons. There is also a ImageView
interface
I have to write any code button event. .

I now write so
 
UIImage * image = [UIImage imageNamed: @ "2.jpg"];
imageView = [imageView initWithImage: image];


Point button has no effect. . .
Reply:
ImageView. Image = [UIImage imageNamed: @ "2.jpg"];
[ImageView setNeedsDisplay];
Reply:
ImageView.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "2.jpg"]];

According to the key NSMutableArray how to modify the values. . . .

[Array objectAtIndex: row]
Modify the above in the key of "aa" value
NSMutableDictionary * item = [[NSMutableDictionary alloc] init];
item = [array objectAtIndex: row];
[Item setObject: @ "222" forKey: @ "aa"];
Error: [__NSCFDictionary setObject: forKey:]: mutating method sent to immutable object '

Thank you seniors doubts under the ball. .
Reply:
Because the array in the dictionary are immutable, with a variable dictionary to write back

Reply:
NSMutableDictionary * item = [[NSMutableDictionary alloc] init];
item = [array objectAtIndex: row];
[Item setObject: @ "222" forKey: @ "aa"];

This. . . You wording problems. . .

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. . . .

As variable as an array. . .
Reply:
NSDictionary * item = [array objectAtIndex: row];
NSMutableDictionary * mutableItem = [NSMutableDictionary dictionaryWithDictionary: item];
[MutableItem setObject: @ "222" forKey: @ "aa"];
[Array setObject: mutableItem atIndexedSubscript: row]

Ask a novice question about the method's return type / state

- (NSInteger) tableView: (UITableView *) tableView numberOfRowsInSection: (NSInteger) section {
return [self.dataController countOfList];
}

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.

xib with StoryBoard how to call each other?

A xib file, landing page, a StoryBoard, responsible for the overall business processes. OK trigger event:

UIStoryboard * stryBoard = [UIStoryboard storyboardWithName: @ "MainStoryboard" bundle: nil];
self.view.window.rootViewController = [stryBoard instantiateInitialViewController];

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.'

Which heroes will give solve?

Reply:
What is achieved searchBar

xcode how to scan all current wireless network and to join a network

As stated, seeking expert answers, thanks.
Reply:
https://github.com/devinshively/wifiAssociate

jump through a UIAlertView iOS Settings

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:
quote 1 floor darkdong reply:
twitter is not the same as it should be built, since there is such general application 5.1 features?

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:
cited two floor theonezh reply:
quote 1 floor darkdong reply: twitter is not the same as it should be built, the general application of 5.1 after having such a function?
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.

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

Can not be used in initWithString NSDate

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) #>];

Your quest is not this? string into data

[TableViewController superview]: unrecognized selector sent to instance

This is what is wrong?

I have a viewController added a TableViewController

Then always report this error

What kind of mistake?

Thank you
Reply:
unrecognized selector sent to instance does not recognize the way you say take this with vain side.
Reply:
quote 1 floor jiangyuaiqing reply:
unrecognized selector sent to instance does not recognize the way you say take this with vain side.


But I just do ah?

If you do not TableViewController will not report this error,

This method which method?

Phone calls iphone system

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

2. UIWebView * callWebview = [[UIWebView alloc] init];
NSString * callString = [NSString stringWithFormat: @ "tel :/ /% @", number];
NSURL * telURL = [NSURL URLWithString: callString];
[CallWebview loadRequest: [NSURLRequest requestWithURL: telURL]];

3. NSString * callString = [NSString stringWithFormat: @ "telprompt:% @", number];
[[UIApplication sharedApplication] openURL: [NSURL URLWithString: callString]];

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.